We advise those who find themselves in such a situation to remain in contact with those who are religiously committed. Stick to those who are attached to the Mosque and committed to performing prayer in congregation. In addition, we think that visiting the nearest Islamic center and communicating with the community scholar will help a lot in this regard and will end this state of seclusion one may be facing.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states the following: “A person suffering from depression should seek professional help to find out whether they are suffering from, some form of depression or psychosomatic disease. Often times, people go through some form of depression without realizing it.
At the same time, one should, do the following on a regular basis:
1. If one is involved in any acts that are sinful or displeasing to Allah, shun them.
2. If one is not consistent and punctual in your salah (prayer), try to be consistent. Remember that salah is our only link with Allah. We cannot protect ourselves against Satan unless we align ourselves with Allah, our Creator and Sustainer.
3. Who are we befriending and keeping company with? Try to get some friends who are conscious of Allah, who might inspire us with good thoughts.
4. Be persistent in asking forgiveness of Allah, especially whenever such bad thoughts occurs.
5. Read the following supplications on a regular basis, in the morning and evening:
Allahumma, anta rabbee, laa ilaaha illaa anta; khalaqtanee, wa ana `abduka wa ana `alaa `ahdika wa wa`dika ma istata`tu; a`udhu bika min sharri maa sana`tu; abu’u laka bi ni`matika `alayya wa abu’u bi dhanbee; fa ighfir lee fa innahu laa yaghfiru al-dhunuba illaa anta (O Allah, You are my Lord, there is no other god but You; You have created me, I am Your servant; I stand by Your covenant with me according to the best of my ability; I seek refuge and protection in You from my evil deeds; I acknowledge Your favors upon me and I confess my sins before You; so forgive me, for no one can forgive sins but You).
Rabbi innee a`udhu bika min hamazaati al-shshayaateeni wa a`udhu bika rabbi an yahdhuruni (my Lord, I seek refuge and protection in You from the whisperings of devils; I seek refuge and protection in You from their presence around me).
Allahumma innee a`udhu bika minmaa ajidu wa uhaadhiru (O Allah, I seek refuge and protection in You from what I feel and fear from).
Laa ilaaha illa Allahu al-`azeemu al-haleem, laa ilaaha illa Allahu rabbu al-`arshi al-`azeem, laa ilaaha illa Allahu rabbu al-ssamaawaati wa al-ardi wa rabbu al-`arshi al-kareem (There is no god but Allah, the Great, the Clement; there is no god but Allah, Lord of the Mighty Throne; there is no god but Allah, Lord of the heavens and earth and the Lord of the Noble Throne).