If a person died by suicide. Is it permissible in Islam for the people to pray his death pray (Salat-ul-Janaaza)?
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.
It is confirmed in the narration reported by Imaam Muslim that a dead man who killed himself with large arrows was brought to the Prophet to pray on him and he refused. Imaam An-Nawawi said in his interpretation of this narration: 'This narration is evidence for those who are of the view that it is not permissible to pray on someone who committed suicide because of such disobedience.' This is the view of 'Umar Ibn 'Abdul-'Azeez and Al-Awzaa'i. However, Al-Hassan, An-Nakh'ee, Qutaadah, Maalik, Abu Haneefah, Ash-Shaafi'ee and the majority of the scholars, may Allaah have mercy on all of them, are of the view that it is permissible to pray on him. They argued that the Prophet did not pray on him as a way to deter other people from committing the same sin; however, the companions prayed on him. The evidence for this is the same narration reported by An-Nasaa'ee with the following wording: "As far as I am concerned, I am not going to pray on him."
Imaam An-Nawawi reporting the words of Al-Qaadhi 'Iyaadh said: 'The view of all the scholars is that it is permissible to pray on the one who is killed by capital punishment, or stoned to death, or committed suicide, or born out of illegal sexual intercourse.' However, Imaam Maalik and others are of the view that 'an Imaam should avoid praying on a person who is killed by capital punishment, and that the people of virtue should not pray on dissolute people as a way of deterrence to others like him.'
To conclude, it is permissible to pray on a person who committed suicide, even if he was a wise person and knew what he was doing and saying, according to the most preponderant opinion of the scholars. But a scholar should not pray on him as a way to deter other people from committing the same sin.
Allaah knows best.
You can search for fatwa through many choices