Sunan Ibn Majah, Volume 2, Book 6, Hadith 1526 (DarusSalam)

It was narrated from Jabir bin Samurah that a man from among the Companions of the Prophet was wounded, and the wound caused him a great deal of pain. He went and took a spearhead, and slaughtered himself with it. The Prophet did not offer the funeral prayer for him, and that was as an admonition for others.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ عَامِرِ بْنِ زُرَارَةَ، حَدَّثَنَا شَرِيكُ بْنُ عَبْدِ اللَّهِ، عَنْ سِمَاكِ بْنِ حَرْبٍ، عَنْ جَابِرِ بْنِ سَمُرَةَ، أَنَّ رَجُلاً، مِنْ أَصْحَابِ النَّبِيِّ ـ صلى الله عليه وسلم ـ جُرِحَ فَآذَتْهُ الْجِرَاحَةُ فَدَبَّ إِلَى مَشَاقِصِهِ فَذَبَحَ بِهِ نَفْسَهُ فَلَمْ يُصَلِّ عَلَيْهِ النَّبِيُّ ـ صلى الله عليه وسلم ـ ‏.‏ قَالَ وَكَانَ ذَلِكَ أَدَبًا مِنْهُ ‏.‏

sunnah.com