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 is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
If this disease makes this man lose his consciousness in a way that he utters the word divorce to his wife but he is not conscious about what he says, then divorce does not take place. However, if this disease does not affect his mind, then when he utters the word divorce, his statement is taken into account and divorce takes place.
To conclude, sanity is the criterion of being held accountable for one's deeds, so whoever is aware of what he says and says it deliberately, then he is held accountable for uttering the word divorce and the like. Nonetheless, if one is not sane, then the pen is lifted from him (he is not held accountable by Allaah for his words and action) and if he utters the word divorce, divorce does not take place.
For more benefit about the ruling on an angry person uttering the word divorce, please refer to Fataawa 81843 and 84170.
Allaah Knows best.