Everyone including Muslims is susceptible to loneliness, sadness, hopelessness, despair, depression but even those can overcome with Islam which is not just a religion but also a complete way of life. Here is how to overcome depression the Islamic way:
Islam offers supplications or prayers (dua) for everything including overcoming anxiety and sorrow like these ones:
'O Allaah, I am Your servant, son of Your servant, son of Your maidservant, my forelock is in Your hand, Your command over me is forever executed and Your decree over me is just. I ask You by every name belonging to You which You name Yourself with or revealed in Your Book, or You taught to any of Your creation, or You have preserved in the knowledge of the unseen with You, that You make the Qur'an the life of my heart and the light of my breast, and a departure for my sorrow and a release for my anxiety.'[Hisnul Muslim].
'O Allaah, I take refuge in You from anxiety and sorrow, weakness and laziness, miserliness and cowardice, the burden of debts and from being overpowered by men.'[Hisnul Muslim].
"In the name of Allah, I place my trust in Allah, and there is no might nor power except with Allah."
ALSO READ: See supplication for anxiety and sorrows
Recite Suratul Nas
Depression can be defined as a low mood where the depressed person is given thoughts that lead to hopelessness and despair. So in order to deal with this and fully overcome it, it makes sense to recite Suratul Nas Surat which is the last chapter of the Qur'an. It is a short six-verse invocation for anyone who needs protection from God.
Reconnect with Allah
Prophet Muhammad (May peace and blessings be upon him) said: Allah Subhanahu Wata'ala said: I am as My servant thinks (expects) I am. I am with him when he mentions Me. If he mentions Me to himself, I mention him to Myself; and if he mentions Me in an assembly, I mention him in an assembly greater than it. If he draws near to Me a hand's length, I draw near to him an arm's length. And if he comes to Me walking, I go to him at speed.'" -(Sahih Bukhari)
Have faith and remain thankful as you wait on Allah
The Prophet, peace, and blessings of Allah be upon him, said: "Allah is pleased with His servant if, when he eats something, he thanks Allah for it, and when he drinks something, he thanks Allah for it."
"And [remember] when your Lord proclaimed, 'If you are grateful, I will surely increase you [in favor]; but if you deny, indeed, My punishment is severe.' " 14:7
Watch the video below to see more ways to overcome depression.