Well. I dont think it is actually a harm of digital era. Depression existed even when there was nothing like technology or social media. But these innovations have kind of highlighted depression and anxiety, mainly because of increased competition, comparisons, more parameters of judgements or fears of not coming up to certain standards.
Of course depression existed without the digital era, but as you said, they have increased the comparisons in people which has mainly impacted the youth. This has made them compare their life to everyone else's "made up happiness".