Indeed, according to some scholars, if a person is suffering from waswaas his talaaq (divorce)does not count even if he utters it, so long as he did not have the intention of talaaq. Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said:
“The talaaq of a person who is suffering from waswaas does not count even if he utters the words, if that was not done deliberately, because this utterance happened because of waswaas, not because of his will or intention. Rather it was forced upon him because of the strength of the waswaas and his lack of self-control. The Prophet (peace and blessings of Allaah be upon him) said, ‘There is no divorce under compulsion.’ So this divorce does not count, because he did not really want to do that. This was something that was forced upon him with no intention or choice on his part to do that, so this does not mean that talaaq has occurred.”
(Fataawa Islamiyyah, compiled by Shaykh Muhammad ibn ‘Abd al-‘Azeez al-Musnad,)
How is this waswaas?.
Waswaas is a kind a sickness, may Allaah keep us and you safe from it. It is caused by the shaytaan gaining control over a person and filling him with anxiety, grief, distress and worry.
Waswaas is of various kinds, such as waswasah about divorce, where the person affected thinks that he has divorced his wife, or thinks to himself about divorce and he is uncertain as to whether he has uttered the words of divorce or not, and he remains confused, although he has no intention or desire to divorce his wife.
Some of them think that if they say a certain word to their wives or they do not respond to them, that divorce has taken place thereby, and that this is a metaphor for divorce. All of that is an illusion that has no reality. Perhaps he feels that the words came out of his mouth and he heard them. Even if we assume that such a person did speak audible words, then as long as he is affected by waswaas and did not really intend a divorce, then his divorce does not count. This is the meaning of the words of Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) quoted in the question.
Some people experience waswaas with regard to purification; every time they do wudoo’, (ablution) they repeat it, thinking that they did not wash one part of the body, or that their wudoo’ is lacking, or that if they do not repeat wudoo’ they will remain uncertain for the rest of the day. Thus he is overwhelmed with a strong urge to repeat his wudoo’, and he will not feel at ease until he does so. We have mentioned in a number of answers that the way to treat waswaas is to strengthen one’s faith by doing righteous deeds and reciting beneficial dhikrs (words of remembrance), and also not paying attention to the waswaas or responding to it.
And Allaah knows best.