Praise be to Allah.
You should understand – may Allah guide us and you – that flat affect is a symptom, and is not a disease in and of itself.
This symptom may appear as a result of various causes, beginning with personality disorders and ending with psychotic disorders.
What is usually the case with psychotic disorders is that they are chronic.
But it is possible to control most of the symptoms in such cases, especially those that are called positive symptoms, such as delusions and auditory hallucinations, by taking medication regularly and consistently.
The general principle regarding the one who is affected by any personality disorder or psychotic disorder is that he is accountable commensurate with whatever he learns and understands of Islamic teachings and duties.
That is because what makes a person accountable and one of those to whom the teachings of Islam are addressed is reason, not emotions or conscience. The Prophet (blessings and peace of Allah be upon him) said: “The Pen has been lifted from three: from the sleeper until he wakes up, from the minor until he grows up, and from the insane until he comes back to his senses.” Narrated by at-Tirmidhi (1423); classed as saheeh by al-Albaani in Saheeh at-Tirmidhi.
If a person has reason and understands the contents of the religious texts and what is required of him, then he is accountable, even if he is mentally ill and even if he does not feel any emotions or is lacking some of them.
If his illness means that he does not feel any emotions, then he may be pardoned for not having the emotions and feelings that Allah has enjoined him to have but he was not able to feel, such as loving his parents, loving to obey Allah and do acts of worship, or hating the disbelievers and evil deeds.
If that mental illness does not affect his reason and understanding, then he must pray and fast, because he is still accountable.
If he loses his reason and sanity sometimes, or he passes out, then he is excused during that time when he loses his reason. But when he recovers, he is no longer excused, and he must offer the prayer that is currently due and make up the prayers that he missed during the time when he had lost his reason. The same applies if he is affected by episodes of intense psychotic symptoms, such as delusions and mania.
It should be noted that zakaah is obligatory for minors and those who are insane, or the one who loses his reason suddenly and temporarily, according to the majority of fuqaha’, with the exception of the Hanafis. The view that it is obligatory is the view favoured by Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him), as stated in ash-Sharh al-Mumti‘ (6/14).
For more information, please see the answer to question no. 75307 .
And Allah knows best.