The evidence that the one who kills himself is not considered a disbeliever
باب الدَّلِيلِ عَلَى أَنَّ قَاتِلَ نَفْسِهِ لاَ يَكْفُرُ
Sahih Muslim, Book of The Book of Faith(view book)
Sahih Muslim 116
It is narrated on the authority of Jabir that Tufail son of Amr al-Dausi came to the Apostle ﷺ and said: Do you need strong, fortified protection? The tribe of Daus had a fort in the pre-Islamic days. The Apostle ﷺ declined this offer, since it (the privilege of protecting the Holy Prophet) had already been reserved for the Ansar. When the Apostle ﷺ migrated to Medina, Tufail son of Amr also migrated to that place, and there also migrated along with him a man of his tribe. But the climate of Medina did not suit him, and he fell sick. He felt very uneasy. So he took hold of an iron head of an arrow and cut his finger-joints. The blood streamed forth from his hands, till he died. Tufail son of Amr saw him in a dream. His state was good and he saw him with his hands wrapped. He (Tufail) said to him: What treatment did your Allah accord to you? He replied. Allah granted me pardon for my migration to the Apostle ﷺ: He (Tufail) again said: What is this that I see you wrapping up your hands? He replied: I was told (by Allah): We would not set right anything of yours which you damaged yourself. Tufail narrated this (dream) to the Messenger of Allah ﷺ. Upon this he prayed: O Allah I grant pardon even to his hands.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، جَمِيعًا عَنْ سُلَيْمَانَ، - قَالَ أَبُو بَكْرٍ حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، - حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ حَجَّاجٍ الصَّوَّافِ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، أَنَّ الطُّفَيْلَ بْنَ عَمْرٍو الدَّوْسِيَّ، أَتَى النَّبِيَّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ هَلْ لَكَ فِي حِصْنٍ حَصِينٍ وَمَنَعَةٍ - قَالَ حِصْنٌ كَانَ لِدَوْسٍ فِي الْجَاهِلِيَّةِ - فَأَبَى ذَلِكَ النَّبِيُّ ﷺ لِلَّذِي ذَخَرَ اللَّهُ لِلأَنْصَارِ فَلَمَّا هَاجَرَ النَّبِيُّ ﷺ إِلَى الْمَدِينَةِ هَاجَرَ إِلَيْهِ الطُّفَيْلُ بْنُ عَمْرٍو وَهَاجَرَ مَعَهُ رَجُلٌ مِنْ قَوْمِهِ فَاجْتَوَوُا الْمَدِينَةَ فَمَرِضَ فَجَزِعَ فَأَخَذَ مَشَاقِصَ لَهُ فَقَطَعَ بِهَا بَرَاجِمَهُ فَشَخَبَتْ يَدَاهُ حَتَّى مَاتَ فَرَآهُ الطُّفَيْلُ بْنُ عَمْرٍو فِي مَنَامِهِ فَرَآهُ وَهَيْئَتُهُ حَسَنَةٌ وَرَآهُ مُغَطِّيًا يَدَيْهِ فَقَالَ لَهُ مَا صَنَعَ بِكَ رَبُّكَ فَقَالَ غَفَرَ لِي بِهِجْرَتِي إِلَى نَبِيِّهِ ﷺ فَقَالَ مَا لِي أَرَاكَ مُغَطِّيًا يَدَيْكَ قَالَ قِيلَ لِي لَنْ نُصْلِحَ مِنْكَ مَا أَفْسَدْتَ . فَقَصَّهَا الطُّفَيْلُ عَلَى رَسُولِ اللَّهِ ﷺ . فَقَالَ رَسُولُ اللَّهِ ﷺ " اللَّهُمَّ وَلِيَدَيْهِ فَاغْفِرْ "