Sahih Muslim 978
Sahih Muslim · Book 11: The Book of Prayer - Funerals · Leaving the funeral prayer for one who committed suicide
Jabir b. Samura reported:
حَدَّثَنَا عَوْنُ بْنُ سَلاَّمٍ الْكُوفِيُّ ، أَخْبَرَنَا زُهَيْرٌ ، عَنْ سِمَاكٍ ، عَنْ جَابِرِ بْنِ سَمُرَةَ ، قَالَ أُتِيَ النَّبِيُّ صلى الله عليه وسلم بِرَجُلٍ قَتَلَ نَفْسَهُ بِمَشَاقِصَ فَلَمْ يُصَلِّ عَلَيْهِ .
(The dead body) of a person who had killed himself with a broad-headed arrow was brought before the Messenger of Allah (ﷺ), but he did not offer prayers for him.