All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
When a husband becomes mentally ill, this is not considered divorce. Rather, if it is proven that the wife will be afflicted with harm by living with an insane husband and she cannot resume marital life with him, then it is permissible for her to bring her issue before the court, which will divorce her from him, after granting him a year for potential recovery. If he recovers during that year, their marriage will still be valid. Otherwise, she may choose between divorce and remaining in wedlock with him. Ibn Wahb a Maaliki scholar, said: "An insane person, whether his illness is temporary or permanent; if he causes harm to his wife and it is expected that she is afflicted with harm, they should be separated and he is granted a year for recovery. During this year, he is obliged to spend on her from his own property. If he does not recover during that year, then she is given the option either to be divorced or to remain married to him.”
Consequently, if it is actually proven that her husband is indeed insane and she expects harm from being with him, then she is allowed to ask for divorce after bringing the issue before the court. Otherwise, she will be his wife and no one is entitled to marry her.
We alert that if her husband divorced her while he was insane, the divorce will be ineffective, according to scholars. Also, if the wife approved of that defect in her husband before marriage, she is not entitled to ask for divorce now.
Allaah Knows best.