A study done at Harvard set out to discover what the correlation of mental health and social media use looked like. Contrary to what we tend to see online, they actually found a positive correlation. They based their study around these three factors: social well-being, positive mental health, and self-rated health. However, this positive correlation did not apply to all. They found that it varied based on demographic, socioeconomic, and racial population sub-groups.
https://www.hsph.harvard.edu/news/features/social-media-positive-mental-health/