Islamic intellectual heritage has, from its earliest days, recognized the reality of mental and emotional suffering and worked actively to cultivate wellbeing. This tradition begins with the Prophet Muhammad ﷺ and his companions and extends through generations of Muslim scholars who followed. It is therefore worth asking where the notion arose that mental health difficulties are a source of shame, or that a true believer is somehow immune from psychological struggle and needs only to strengthen his faith to be cured.
Some Muslims say, "A Muslim cannot be afflicted by depression," or, "Depression is the result of weak faith; all you need to do is pray more." To support this, they sometimes cite the verse, "Indeed, those who believe, do good, establish prayer, and pay alms-tax will receive their reward from their Lord, and there will be no fear for them, nor will they grieve" (al-Baqarah 2:277). Yet the early Muslims understood this verse to describe the state of the believer in the Hereafter, not this world. Imam al-Ṭabarī explained that there is no fear for the believers in the Hereafter and no grief over what they missed in the world, and Ibn Kathīr agreed, saying the believers neither fear what is to come on the Day of Resurrection nor sorrow over what they left behind. This world, by contrast, is a place of trials. The believers are told to expect testing in their wealth and their own selves, with fear, famine, and loss, and also through pleasures and gains.
These tests fall upon all people, including the best of them, the prophets. The Prophet ﷺ taught that Allah tests those He loves most, to strengthen them and cultivate resilience and gratitude. Sa'd reported that when the Prophet ﷺ was asked which people face the greatest trials, he replied, "The prophets, then those who follow their path, then those who follow them. A human is afflicted in proportion to their faith; if they are firm in their faith, their trial is increased, but if there is weakness in their faith, their trial is made lighter for them, and this continues until they walk on the earth almost having no sin." Thus greater faith invites greater trial, not exemption from it.
The prophets themselves experienced intense emotional difficulty. Part of the humanity of the Prophet Muhammad ﷺ is seen in the struggles he endured and overcame. His grief during the "year of sadness" was so profound, compounded by the financial pressure of the Quraysh boycott and the pain of the disbelievers' rejection, that Allah addressed it directly: "Perhaps, then, will you grieve yourself to death over their denial, if they continue to disbelieve in this message" (al-Kahf 18:6), and "So do not grieve yourself to death over them" (Fāṭir 35:8). Importantly, Allah urged him to manage this grief rather than be consumed by it. When his son Ibrāhīm lay dying, the Prophet ﷺ wept and said, "Indeed, the eyes shed tears and the heart feels sorrow. Yet, we do not say anything except that which is pleasing to our Lord. Your departure, O Ibrahim, surely leaves us all deeply saddened." Here he modeled the acknowledgment of emotion together with acceptance of Allah's decree.
The Prophet ﷺ taught a holistic path to healing that combined spiritual remedies, emotional regulation, and care of the body. ʿĀʾishah (RAA), when a relative died, would prepare talbīnah, a soup of barley, milk, and honey, and say, "Eat of it, for I heard Allah's Messenger ﷺ saying, 'Talbīnah soothes the heart of the patient and relieves some of his sadness.'" She used it to treat grief and its severe effects, recognizing a physical treatment for emotional distress. The Prophet ﷺ described talbīnah as strengthening the bereaved heart and removing sorrow "similar to how one of you removes dust from their face by washing their face with water." He further encouraged seeking every available remedy: "Seek cures, O servants of God, for God has placed a cure for every ailment that He has allowed, except for old-age/death." This encouragement is said to have catalyzed the development of Islamic medicine and the distinct discipline of al-ṭibb al-nabawī. It should be noted that while scholars such as Ibn Taymiyyah affirmed that the evil eye, jinn possession, and magic are real phenomena that can affect health, not all mental health problems arise from supernatural causes; the Prophetic framing directs Muslims toward spiritual, psychological, and medicinal remedies alike.
This legacy continued in the works of later scholars. In Baghdad, Muslim and non-Muslim scholars collaborated to preserve and produce knowledge of the human psyche, generally taking one of two approaches. Some translated Greek, Persian, and Indian works, filtered them against Islamic theology, and built upon them. Al-Kindī (d. 873 CE), commissioned to oversee translation in the House of Wisdom, sought to reconcile Greek and Islamic thought and, in his work on repelling sorrows, borrowed the Qur'anic phrase "so that you do not grieve over what you have missed out on" (al-Ḥadīd 57:23). Others grounded themselves first in revelation. Ibn al-Qayyim (d. 1350 CE) drew almost exclusively from revelatory sources and proposed a stage-theory of cognition based on Qur'anic terms. In his Ighāthat al-Lahfān he affirmed that diseases of the heart include anxiety, sadness, depression, and anger, treatable by addressing their root cause or with medicine, "because the heart is harmed by what harms the body and vice versa." Al-Balkhī (d. 934 CE), in Maṣāliḥ al-Abdān wa-al-Anfus, urged readers with striking seriousness to treat psychological illness, arguing it is as grave as physical illness. His description of obsessive-compulsive disorder closely matches modern diagnostic criteria; he attributed its causes to black bile, to the whispers of Shayṭān, or to both, and urged treatment regardless of the presumed cause, quoting the hadith that for every illness Allah has created a cure.
This heritage was also embodied in institutions. Psychiatric wards emerged in the Muslim world roughly five centuries before Europe, the earliest recorded care being at the al-Fusṭāṭ Hospital in Cairo (872–3 CE). From the tenth century, healing centers known as dār al-shifāʾ or māristāns arose across the Muslim world in Damascus, Baghdad, and Cairo, sited centrally so that the sick could be reached and the Sunnah of visiting the ill fulfilled, with attention to clean air and water. Treatments were varied: simple and compound drugs, early antidepressants called mufarriḥ al-nafs, alongside Qur'anic recitation, soothing sounds, bathing, balanced diets, cupping, massage, and immersion in nature. Discharged patients even received financial support for reintegration, earning this tradition the name "humanistic medicine."
This legacy was later interrupted. Studies suggest that Muslims today underutilize mental health services despite elevated risk, often distrusting modern psychology, avoiding medication, and fearing judgment or indoctrination. A general shift away from religion, weakening religious practice, and declining political power altered attitudes toward mental illness, while modern Western psychology developed in a world that had forgotten Islamic contributions. Colonial and secular forces divided the Muslim world and severed it from its holistic heritage; the example is given of Mohamed Ali installing French-speaking teachers, inserting linguistic barriers and eroding confidence in combining rational and revelatory sources. As religion was pushed from the academy and the causes of mental illness came to be seen as purely spiritual, stigma rose and the once-robust holistic understanding of wellness faded.
Islamic history nurtured mental health from the time of the Prophet ﷺ through generations of scholarship, producing ʿilm al-nafs as a precursor to psychology through the joint efforts of philosophers, theologians, and physician-scientists. Its holistic model, most famously described by Imam al-Ghazālī, placed the heart at the center, connected to mind, body, soul, and emotions. Because these scholars regarded the causes of mental illness as multifactorial, involving biology, heritable factors, environment, and spirituality, they never reduced it to weakness of faith, nor did they prescribe prayer alone. To move forward, we must learn from this past, critically assess the stigma present in our communities, and stand upon the shoulders of the scholars who came before us to carry this legacy forward.