Yes. Various types of mental illness have been discussed by Muslim scholars for centuries. Contemporary scholars recognize the need for both spiritual and clinical treatments to address mental health struggles.
Many Muslim scholars have dedicated their lives to exploring the spiritual and psychological dimensions of human well-being and flourishing—including aspects that would fall under the contemporary classification of mental health.
In the fields of clinical psychology and psychiatry, many practitioners increasingly recognize the role of spirituality as an essential part of both the prevention and treatment of mental illness. A systematic review of multiple studies showed that increased levels of spirituality and religiosity in adolescence correlated with better mental health.
It should be clarified, however, that in discussing the beneficial role that spirituality and psycho-spiritual therapy (such as prayer) can have on mental health and well-being, we do not intend to minimize other forms of treatment. This delicate balance was understood by Muslim scholars centuries before the development of modern psychiatry. For instance, the 14th century scholar Ibn al-Qayyim writes that, “The second category of diseases of the heart are based on emotional states such as anxiety, sadness, depression, and anger. These types of ailment can be treated naturally by treating the cause or with medicine that goes against the cause and this is because the heart is harmed by what harms the body and vice versa.”