With the advent social media, people publicise their good times but often forget that other members of the audience may become envious of them and feel depressed as they cannot enjoy same.
Fortunately, the Prophet (p.b.u.h) has provided us with recommendations to fight loneliness and depression:
Make it a point to attend the congregational prayer
Muslims are encouraged to perform their prayers in the mosque for not only to receive the spiritual rewards but also a chance to meet people and uplift those who feel distant from the society.
Greet each other
The Prophet (p.b.u.h) recommended us to greet peace to one another with a smile on our faces for it is considered as an act of charity.
Ask about people’s well-being
It is a Sunnah to do so and, by this, people do not feel neglected in society but instead valued.
Make people feel loved
The Prophet (p.b.u.h) encouraged those who love each other to express (by giving gifts or saying kind words) and saying it, for the sake of Allah. By making people feel special, which was in fact within his personality, many of the companions of the Prophet (p.b.u.h) felt that they were loved.
Visit each other
The Prophet (p.b.u.h) encouraged his people to visit each other and to treat the guests well for the sake of The Almighty and without expecting any favours.
Support people during hardships
Whenever a friend is in difficulty, one of the cures is to support him or her in the best way we can. The Prophet (p.b.u.h) informed to his people to visit our brothers and sisters when he or she is sick to console them. Eventually, Allah will shield us on the Day of Judgement.
You can also search for Duas to cure depression or home remedies to cure depression and loneliness as well.