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.