In the name of Allah, the Gracious, the Merciful

Depression and anxiety are two closely related ailments that will afflict many of us at one time or another during our lives. Periods of grief and worry are a normal part of life, which can usually be cured with prayer, patience, and positive thinking. However, sometimes we unwittingly nurture these negative feelings to the point of developing an anxiety disorder or clinical depression.

For those of us who experience abnormal and unhealthy levels of grief and worry, there is hope in Islam to overcome these debilitating symptoms without resorting to pharmaceuticals. We should seek our cure for depression and anxiety in a holistic manner by addressing its physical, mental, social, and spiritual aspects. These symptoms usually occur because there is something wrong, but treatable, in our body, mind, or spirit that needs to be fixed.

If depression and anxiety persist after exhausting these techniques, then medical intervention by a specialist doctor may be necessary.

First, we must recognize that in Islam our physical bodies have a right over us, that we take care of our health, optimize our nutrition, get enough quality sleep, and physically exercise regularly. These three – diet, sleep, and exercise – are the pillars of physical health.

Aisha reported: The Messenger of Allah, peace and blessings be upon him, said:

وَإِنَّ لِنَفْسِكَ عَلَيْكَ حَقًّا فَصُمْ وَأَفْطِرْ وَصَلِّ وَنَمْ Verily, your own self has rights over you, so fast and break your fast, pray and sleep. Source: Sunan Abī Dāwūd 1369, Grade: Sahih

Indeed, prayer and fasting are inherently good acts, but doing them excessively to the point of neglecting the needs of the body makes them blameworthy. One cannot continue to worship Allah without a healthy body, so a healthy body takes priority over voluntary worship.

The most important aspect of bodily health is to eat nutritious, wholesome, and natural foods, because most diseases take root in the stomach due to unhealthy eating habits.

Ibn Rajab reports that classical Arab doctors would say:

الْحَمِيَّةُ رَأْسُ الدَّوَاءِ وَالْبِطْنَةُ رَأْسُ الدَّاءِ Diet is the foundation of medicine and gluttony is the foundation of illness. Source: Jāmi’ al-‘Ulūm wal-Ḥikam 2/468

Many of us become depressed because our bodies are not receiving enough nutrients, and such an imbalance affects our whole being. Hence, Allah commands us to eat wholesome foods (tayyibat) produced naturally from the earth.

Allah said:

يَا أَيُّهَا الَّذِينَ آمَنُوا كُلُوا مِن طَيِّبَاتِ مَا رَزَقْنَاكُمْ وَاشْكُرُوا لِلَّهِ إِن كُنتُمْ إِيَّاهُ تَعْبُدُونَ O you who believe, eat from the wholesome things which We have provided for you and be grateful to Allah, if it is him that you worship. Surat al-Baqarah 2:172

Much of the industrial, mass-produced food in our age is highly processed and stripped of its nutrients. These foods contain too much sugar, salt, chemicals, and other harmful additives. We should take gradual steps to eat less of these foods while adding more fruits, vegetables, healthy fats and proteins to our diet.

We also need to avoid extravagance with food and overeating. Even eating too much good food can cause a nutritional imbalance, which will ultimately affect our mental health.

Miqdam ibn Ma’d reported: The Messenger of Allah, peace and blessings be upon him, said:

مَا مَلَأَ آدَمِيٌّ وِعَاءً شَرًّا مِنْ بَطْنٍ حَسْبُ الْآدَمِيِّ لُقَيْمَاتٌ يُقِمْنَ صُلْبَهُ فَإِنْ غَلَبَتْ الْآدَمِيَّ نَفْسُهُ فَثُلُثٌ لِلطَّعَامِ وَثُلُثٌ لِلشَّرَابِ وَثُلُثٌ لِلنَّفَسِ There is no vessel which the son of Adam can fill that is more evil than his stomach, for it is enough for him to take a few bites in order to straighten his back. Yet if he is overcome by appetite, then he may fill it with a third of food, a third of drink, and a third of breath. Source: Sunan Ibn Mājah 3349, Grade: Sahih

Umar ibn al-Khattab, may Allah be pleased with him, said:

أَيُّهَا النَّاسُ إِيَّاكُمْ وَالْبِطْنَةَ مِنَ الطَّعَامِ فَإِنَّهَا مَكْسَلَةٌ عَنِ الصَّلاةِ مُفْسِدَةٌ لِلْجَسَدِ مُوَرِّثَةٌ لِلسَّقَمِ وَأَنَّ اللَّهَ تَبَارَكَ وَتَعَالَى يُبْغِضُ الْحَبْرَ السَّمِينَ وَلَكِنْ عَلَيْكُمْ بِالْقَصْدِ فِي قُوتِكُمْ فَإِنَّهُ أَدْنَى مِنَ الإِصْلاحِ وَأَبْعَدُ مِنَ السَّرَفِ وَأَقْوَى عَلَى عِبَادَةِ اللَّهِ وَإِنَّهُ لَنْ يَهْلِكَ عَبْدٌ حَتَّى يُؤْثَرَ شَهْوَتَهُ عَلَى دِينِهِ O people, beware of gluttony in eating. Verily, it causes laziness with the prayer, it harms the body, it inherits disease, and Allah Almighty detests the fatness of a cleric. Rather, you must be moderate in your provisions, for it is closer to righteousness, further from extravagance, and stronger for the worship of Allah. Verily, a servant is not destroyed unless he prefers his desires over his religion. Source: al-Jū’ li-Ibn Abī Dunyā 81

The Sunnah is to fill the stomach with one third of food, one third of drink, and one third left empty, except for special occasions when it is permitted to eat one’s fill. One should gradually decrease their food portions and intake over time until they become accustomed to eating in moderate amounts. If we followed this wise advice, as difficult as it may be for some of us, we would inevitably see the positive results on our bodies and subsequently on our depression and anxiety.

In addition to diet, we need to make sure we get enough quality sleep and exercise. Allah created the night time for us to rest, and our bodies need it to heal and recharge our energy reserves. Neglecting our sleep requirements for any reason, even prayer, is a blameworthy excess.

Allah said:

وَجَعَلْنَا نَوْمَكُمْ سُبَاتًا وَجَعَلْنَا اللَّيْلَ لِبَاسًا And We made your sleep for rest and the night as a covering. Surat al-Naba 78:9-10

Practicing the prophetic traditions related to sleep as a nightly routine, as part of healthy sleep hygiene, will strengthen the body and aid the healing process, among many other benefits.

Next, we should adopt Islamic mindfulness techniques to gain control over our negative thoughts. Thoughts are often difficult to regulate, but we do have a degree of control over what we choose to think about and reflect upon. The true believer should try to be an optimist, thinking the best about Allah and his decrees, rather than being a pessimist who always dwells upon the worst case scenario.

Conscious thinking is a habit and a choice; if we are in the habit of thinking negatively, we should apply mindfulness techniques to form better thinking habits.

One of the most destructive ways of thinking is to nurture hatred, envy, and malice towards others. Many times our hatred of others harms ourselves more than anyone else. We have to force ourselves to forgive others, to let go of grudges, and to calm pent up feelings of anger. The prophetic way is to cleanse our mind of hateful thoughts every morning and evening through prayer and supplication.

Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, said to me:

يَا بُنَيَّ إِنْ قَدَرْتَ أَنْ تُصْبِحَ وَتُمْسِيَ لَيْسَ فِي قَلْبِكَ غِشٌّ لِأَحَدٍ فَافْعَلْ My son, if you are able every morning and evening to remove any rancor from your heart towards anyone, then do so.

Then, the Prophet said to me:

يَا بُنَيَّ وَذَلِكَ مِنْ سُنَّتِي وَمَنْ أَحْيَا سُنَّتِي فَقَدْ أَحَبَّنِي وَمَنْ أَحَبَّنِي كَانَ مَعِي فِي الْجَنَّة My son, that is my tradition and whoever revives my tradition has loved me, and whoever loves me will be with me in Paradise. Source: Sunan al-Tirmidhī 2678, Grade: Hasan

We should not indulge in negative assumption and suspicion about others. Sometimes we find ourselves thinking the worst about others and even expressing it verbally by backbiting against them. We should apply mindfulness techniques to catch ourselves in such moments and switch our mental self-conversation to something better.

Allah said:

يَا أَيُّهَا الَّذِينَ آمَنُوا اجْتَنِبُوا كَثِيرًا مِّنَ الظَّنِّ إِنَّ بَعْضَ الظَّنِّ إِثْمٌ ۖ وَلَا تَجَسَّسُوا وَلَا يَغْتَب بَّعْضُكُم بَعْضًا O you who believe, avoid much suspicion. Verily, some suspicion is sin, and do not spy or backbite each other. Surat al-Hujurat 49:12

Not only must we gain control over our thoughts and feelings towards people, we must also control our thoughts and feelings related to objects. When our happiness depends upon material wealth and success, we are bound to be disappointed as such worldly pleasures will never last forever. If we are too deeply attached to a material object, we will become depressed when it is inevitably taken away.

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said:

تَعِسَ عَبْدُ الدِّينَارِ وَالدِّرْهَمِ وَالْقَطِيفَةِ وَالْخَمِيصَةِ إِنْ أُعْطِيَ رَضِيَ، وَإِنْ لَمْ يُعْطَ لَمْ يَرْضَ Wretched is the servant of gold, silver, fine clothes, and garments. If he is given he is pleased, but if he is not given he is displeased. Source: Ṣaḥīḥ al-Bukhārī 6071, Grade: Sahih

Often people become depressed when they do not get what they want, but true believers, who have trained themselves to be unattached to the world, are always happy even in dire circumstances. The Prophet (s) suffered for the cause of Islam more than any of us, losing his loved ones and enduring pain and hunger, yet the companions reported that they never saw anyone smile as often as him.

Abdullah ibn al-Harith reported:

مَا رَأَيْتُ أَحَدًا أَكْثَرَ تَبَسُّمًا مِنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ I have not seen anyone smile more often than the Messenger of Allah, peace and blessings be upon him. Source: Sunan al-Tirmidhī 3641, Grade: Sahih

Even when death and destruction seemed so close, the Prophet (ṣ) would continue to smile and spread his positive thinking and optimism.

Another important factor in our overall health is our place in the support structure of our community. Loneliness is a common cause of depression and anxiety, so having a real social network (not simply online) is essential.

Abu Musa reported: The Messenger of Allah, peace and blessings be upon him, said:

إِنَّ الْمُؤْمِنَ لِلْمُؤْمِنِ كَالْبُنْيَانِ يَشُدُّ بَعْضُهُ بَعْضًا Verily, the believers are like a structure, each part strengthening the other. Source: Ṣaḥīḥ al-Bukhārī 467, Grade: Muttafaqun Alayhi

We should surround ourselves with family, friends, and believers who can be a positive influence on us. If we simply cannot find enough good people to be around, then it is better to be lonely than surrounded by bad people.

Abu Musa reported: The Messenger of Allah, peace and blessings be upon him, said:

إِنَّمَا مَثَلُ الْجَلِيسِ الصَّالِحِ وَالْجَلِيسِ السَّوْءِ كَحَامِلِ الْمِسْكِ وَنَافِخِ الْكِيرِ فَحَامِلُ الْمِسْكِ إِمَّا أَنْ يُحْذِيَكَ وَإِمَّا أَنْ تَبْتَاعَ مِنْهُ وَإِمَّا أَنْ تَجِدَ مِنْهُ رِيحًا طَيِّبَةً وَنَافِخُ الْكِيرِ إِمَّا أَنْ يُحْرِقَ ثِيَابَكَ وَإِمَّا أَنْ تَجِدَ رِيحًا خَبِيثَةً Verily, the parable of a good friend and a bad friend is only that of a seller of musk and a blacksmith. The seller of musk will give you some perfume, you will buy some, or you will notice a good smell. As for the blacksmith, he will burn your clothes or you will notice a bad smell. Source: Ṣaḥīḥ al-Bukhārī 1995, Grade: Muttafaqun Alayhi

Abu Darda, may Allah be pleased with him, said:

الصَّاحِبُ الصَّالِحُ خَيْرٌ مِنَ الْوَحْدَةِ وَالْوَحْدَةُ خَيْرٌ مِنَ الصَّاحِبِ السُّوءِ وَمُمْلِي الْخَيْرِ خَيْرٌ مِنَ السَّاكِتِ وَالسَّاكِتُ خَيْرٌ مِنْ مُمْلِي الشَّرِّ A righteous companion is better than loneliness, and loneliness is better than an evil companion. A good writer is better than one silent, and one silent is better than an evil writer. Source: Rawḍat al-‘Uqalā 56

Finally, we have to become spiritually healthy by adhering to authentic theological beliefs and practicing acts of worship properly. There is a specific supplication that the Prophet (s) taught us for curing depression and anxiety, which reveals how important sound creed is to our mental health:

Ibn Mas’ud reported: The Messenger of Allah, peace and blessings be upon him, said:

اللَّهُمَّ إِنِّي عَبْدُكَ وَابْنُ عَبْدِكَ وَابْنُ أَمَتِكَ نَاصِيَتِي بِيَدِكَ مَاضٍ فِيَّ حُكْمُكَ عَدْلٌ فِيَّ قَضَاؤُكَ أَسْأَلُكَ بِكُلِّ اسْمٍ هُوَ لَكَ سَمَّيْتَ بِهِ نَفْسَكَ أَوْ عَلَّمْتَهُ أَحَدًا مِنْ خَلْقِكَ أَوْ أَنْزَلْتَهُ فِي كِتَابِكَ أَوْ اسْتَأْثَرْتَ بِهِ فِي عِلْمِ الْغَيْبِ عِنْدَكَ أَنْ تَجْعَلَ الْقُرْآنَ رَبِيعَ قَلْبِي وَنُورَ صَدْرِي وَجِلَاءَ حُزْنِي وَذَهَابَ هَمِّي O Allah, I am your servant, the son of your servant, the son of your maidservant. My forelock is in your hand, your command concerning me prevails, and your decision concerning me is just. I call upon you by every one of the beautiful names with which you have described yourself, or which you have revealed in your Book, or you have taught to any of your creatures, or which you have chosen to keep in the knowledge of the unseen with you, to make the Quran the delight of my heart, the light of my chest, and to remove my sadness and dispel my anxiety. Source: Musnad Aḥmad 3704, Grade: Sahih

This supplication expresses firm faith in the providence of Allah (al-qada’ wal-qadr) over all creation. We should remember that Allah is in control of everything and, as long as we have faith, he will decree only what is best for us in this world and in the Hereafter.

Suhayb reported: The Messenger of Allah, peace and blessings be upon him, said:

عَجَبًا لِأَمْرِ الْمُؤْمِنِ إِنَّ أَمْرَهُ كُلَّهُ خَيْرٌ وَلَيْسَ ذَاكَ لِأَحَدٍ إِلَّا لِلْمُؤْمِنِ إِنْ أَصَابَتْهُ سَرَّاءُ شَكَرَ فَكَانَ خَيْرًا لَهُ وَإِنْ أَصَابَتْهُ ضَرَّاءُ صَبَرَ فَكَانَ خَيْرًا لَهُ Wondrous is the affair of a believer, as there is good for him in every matter; this is not the case for anyone but a believer. If he experiences pleasure, he thanks Allah and it is good for him. If he experiences harm, he shows patience and it is good for him. Source: Ṣaḥīḥ Muslim 2999, Grade: Sahih

This is the secret to authentic happiness, by which so many of the righteous predecessors were able to remain positive despite living in difficult circumstances. They understood that, as long as they had faith, whatever Allah decreed for them was good; if not immediately in this life, then definitely in the next.

Even if something that happened looked bad to them in worldly terms, they had faith that it was the best for their destiny in the Hereafter. They would always praise Allah in every circumstance, hardship or ease.

Aisha reported: The Messenger of Allah, peace and blessings be upon him, said:

الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ All praise is due to Allah in every circumstance. Source: Sunan Ibn Mājah 3803, Grade: Sahih

Abu Huraira reported: The Prophet, peace and blessings be upon him, said:

قَالَ اللَّهُ عَزَّ وَجَلَّ إِنَّ الْمُؤْمِنَ عِنْدِي بِمَنْزِلَةِ كُلِّ خَيْرٍ يَحْمَدُنِي وَأَنَا أَنْزِعُ نَفْسَهُ مِنْ بَيْنِ جَنْبَيْهِ Allah Almighty said: Verily, the believer is always in a good position with me. He praises me, even as I remove his soul from between his two sides. Source: Musnad Aḥmad 8514, Grade: Sahih

And Shuraih, may Allah be pleased with him, said:

إِنِّي لَأُصَابُ بِالْمُصِيبَةِ فَأَحْمَدُ اللَّهَ عَلَيْهَا أَرْبَعَ مَرَّاتٍ أَحْمَدُ إِذْ لَمْ يَكُنْ أَعْظَمَ مِنْهَا وَأَحْمَدُ إِذْ رَزَقَنِي الصَّبْرَ عَلَيْهَا وَأَحْمَدُ إِذْ وَفَّقَنِي لِلِاسْتِرْجَاعِ لِمَا أَرْجُو مِنَ الثَّوَابِ وَأَحْمَدُ إِذْ لَمْ يَجْعَلْهَا فِي دِينِي Verily, if I am afflicted by a calamity, then I praise Allah four times. I praise him that it was not worse than it was. I praise him as he provides me with patience to bear it. I praise him as he guides me to remember my hope for reward, and I praise him as he did not make it a calamity in my religion. Source: Siyar A’lām al-Nubalā’ 4/105

In life, we will be disappointed when we experience hardship and loss, but our faith and trust in Allah’s infinite wisdom will help us endure these trials and keep us focused on the greater goal of salvation in the Hereafter.

We should return to the Quran often to hear this message, remind us of the favors of Allah, and keep this worldly existence in a proper perspective. It is through the Quran, which is the greatest way to remember Allah, that our hearts will find rest and assurance.

Allah said:

أَلَا بِذِكْرِ اللَّهِ تَطْمَئِنُّ الْقُلُوبُ No doubt, by the remembrance of Allah hearts are assured. Surat al-Ra’d 13:28

To sum, overcoming depression and anxiety, when they have a stranglehold over our lives, is a very difficult task. It will take patience, sustained effort, and perseverance to implement a long-term plan for well-being, yet there is hope for healing and a clear path forward in Islam. By adopting healthy habits in our mind, body, and spirit, we can restore the natural balance within us that leads to recovery and prosperity.

For those who exhaust these techniques and continue to suffer from depression and anxiety, they may need to consult a specialist doctor to treat their condition.

Success comes from Allah, and Allah knows best.