Rulings in Islamic fiqh concerning one who is insane
Question

What are the rulings concerning one who is insane and how to treat him?
Praise be to Allah.Sanity is the condition of accountability, and insanity is a breakdown of sanity, meaning that the individual’s words and deeds cannot be interpreted in the usual manner except in rare instances.
It was said that insanity is a breakdown of rational thinking that distinguishes between good things and bad things, and can see the consequences of things, so that there is no sign of discernment and no deeds are done that reflect discernment.
See: al-Mawsoo‘ah al-Fiqhiyyah (16/99).
There are many rulings which apply to the one who is insane, and which are discussed in various areas of fiqh. One of those rulings is that the insane person is not required to do physical acts of worship, such as purification, prayer, fasting and Hajj, and they are not valid on his part.
He is required to give zakaah, if he has wealth; his guardian should pay it on his behalf. He is also required to pay penalties and compensation if he damages or destroys something, because this comes under the heading of dealing with the situation, not of accountability.
The insane person is deemed to be Muslim if one of his parents is Muslim, and there is the hope that he will enter Paradise, as stated in the answer to question no. 14392.
The insane person is to be deemed legally incompetent, so transactions of sale and purchase on his part are not valid, and his word is not to be taken seriously in matters of divorce, gift-giving, and so on. Insanity is regarded as a defect with regard to marriage, and requires annulment of the marriage.
No retaliatory punishment (qisaas) is to be carried out on one who is insane, and he is not to be subjected to the hadd punishment for zina and the like.
The insane person may inherit, and his guardian may dispose of his wealth in accordance with what is in his best interests. If he dies and has wealth, it is to be inherited from him.
With regard to much of what we have mentioned above, please see: al-Mawsoo‘ah al-Fiqhiyyah (16/99-116).
See also: al-Junoon wa Anwaa‘uhu fi’l-Manzoor al-Islami – Diraasah ‘Asriyyah, by Safar Ahmad al-Hamdaani:
http://www.alukah.net/publications_competitions/0/41911
See also: Athar al-Junoon fi’t-Tasarrufaat al-Qawliyyah wa’l-Fa‘liyyah fi’sh-Sharee‘ah al-Islamiyyah:
https://www.jamaa.net/books.library/?i=39361#main
And Allah knows best.