Committing suicide due to suffering from a mental disease

Q 6: There is a man who suffers from epilepsy and may fall unconscious for hours. One day, he threw his wife out of the house, shot himself with a gun, and died. Will (Part No. 22; Page No. 252

If he killed himself with the gun at the time he was experiencing a seizure, there will be nothing on him or his heirs at all. The Prophet (peace be upon him) said, "There are three (persons) whose actions are not recorded..." and he mentioned among them the insane until he is restored to reason.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.