Killing oneself is a major sin, and there are stern warnings addressed to the one who does that, but it does not put one beyond the pale of Islam. The one who killed himself should be washed and the funeral prayer offered for him, and he should be buried with the Muslims, because he is a sinner, but he is not a kaafir; killing oneself is a sin, it is not kufr. And Like all sinners he will go to hell for his sins but because he is still a Muslim, he will not stay there forever.
https://islamqa.info/en/22407
Allah :swt: knows best as to whether the act is kufr or sin or virtue - it depends much on the circumstances - if the person has no hope in his/her meeting with Allah :swt: and the rising and judgement on the last day then it may be that the person is dying on kufr and will go to hell.
If the person is sacrificing his/her life for Allah :swt: whilst decimating the ranks of the enemies of truth and justice, the enemies of Allah - it may be that the person is seeking an exchange for full pardon of sins and may even go to paradise.
Not everybody reaches hell although everybody commits sins - whether the person goes to hell before paradise, or to eternal hell, or to immediate paradise depends on many variables - including:
Whether the person sought and accepted the straightest path and call of truth, strove hard, and died upon it.
What his/her results were on the scales of true justice - and this depends on:
Whether Allah :swt: was so pleased with some good deeds or even a single good deed of the person that they are heavy enough to outweigh or even drive the good scale of the person to the floor despite many shortfalls.
Whether Allah was so angry with some evil deeds or even a single evil deed of the person that they are enough to outweigh or even drive the evil scale of the person to the floor despite many good deeds
- and so on.
And Allah :swt: knows best.
﴿سورة البقرة﴾
٧٨) وَمِنْهُمْ أُمِّيُّونَ لَا يَعْلَمُونَ الْكِتَابَ إِلَّا أَمَانِيَّ وَإِنْ هُمْ إِلَّا يَظُنُّونَ
٧٩) فَوَيْلٌ لِلَّذِينَ يَكْتُبُونَ الْكِتَابَ بِأَيْدِيهِمْ ثُمَّ يَقُولُونَ هَٰذَا مِنْ عِنْدِ اللَّهِ لِيَشْتَرُوا بِهِ ثَمَنًا قَلِيلًا ۖ فَوَيْلٌ لَهُمْ مِمَّا كَتَبَتْ أَيْدِيهِمْ وَوَيْلٌ لَهُمْ مِمَّا يَكْسِبُونَ
٨٠) وَقَالُوا لَنْ تَمَسَّنَا النَّارُ إِلَّا أَيَّامًا مَعْدُودَةً ۚ قُلْ أَتَّخَذْتُمْ عِنْدَ اللَّهِ عَهْدًا فَلَنْ يُخْلِفَ اللَّهُ عَهْدَهُ ۖ أَمْ تَقُولُونَ عَلَى اللَّهِ مَا لَا تَعْلَمُونَ
٨١) بَلَىٰ مَنْ كَسَبَ سَيِّئَةً وَأَحَاطَتْ بِهِ خَطِيئَتُهُ فَأُولَٰئِكَ أَصْحَابُ النَّارِ ۖ هُمْ فِيهَا خَالِدُونَ
٨٢) وَالَّذِينَ آمَنُوا وَعَمِلُوا الصَّالِحَاتِ أُولَٰئِكَ أَصْحَابُ الْجَنَّةِ ۖ هُمْ فِيهَا خَالِدُونَ
[Quran Chapter 2]
78. And among them are uneducated who know the Scripture only through hearsay, and they only speculate.
79. So woe to those who write the Scripture with their own hands, and then say, "This is from Allah," that they may exchange it for a little price. Woe to them for what their hands have written, and woe to them for what they earn.
80. And they say, "The Fire will not touch us except for a number of days." Say, "Have you received a promise from Allah—Allah never breaks His promise—or are you saying about Allah what you do not know?"
81. Indeed, whoever commits misdeeds, and becomes besieged by his iniquities—these are the inmates of the Fire, wherein they will dwell forever.
82. As for those who believe and do righteous deeds—these are the inhabitants of Paradise, wherein they will dwell forever.
https://goo.gl/gwd3YF
.
See also:
https://islamqa.info/en/138650
﴿سورة الفرقان﴾
٦٢) وَهُوَ الَّذِي جَعَلَ اللَّيْلَ وَالنَّهَارَ خِلْفَةً لِمَنْ أَرَادَ أَنْ يَذَّكَّرَ أَوْ أَرَادَ شُكُورًا
٦٣) وَعِبَادُ الرَّحْمَٰنِ الَّذِينَ يَمْشُونَ عَلَى الْأَرْضِ هَوْنًا وَإِذَا خَاطَبَهُمُ الْجَاهِلُونَ قَالُوا سَلَامًا
٦٤) وَالَّذِينَ يَبِيتُونَ لِرَبِّهِمْ سُجَّدًا وَقِيَامًا
٦٥) وَالَّذِينَ يَقُولُونَ رَبَّنَا اصْرِفْ عَنَّا عَذَابَ جَهَنَّمَ ۖ إِنَّ عَذَابَهَا كَانَ غَرَامًا
٦٦) إِنَّهَا سَاءَتْ مُسْتَقَرًّا وَمُقَامًا
٦٧) وَالَّذِينَ إِذَا أَنْفَقُوا لَمْ يُسْرِفُوا وَلَمْ يَقْتُرُوا وَكَانَ بَيْنَ ذَٰلِكَ قَوَامًا
٦٨) وَالَّذِينَ لَا يَدْعُونَ مَعَ اللَّهِ إِلَٰهًا آخَرَ وَلَا يَقْتُلُونَ النَّفْسَ الَّتِي حَرَّمَ اللَّهُ إِلَّا بِالْحَقِّ وَلَا يَزْنُونَ ۚ وَمَنْ يَفْعَلْ ذَٰلِكَ يَلْقَ أَثَامًا
٦٩) يُضَاعَفْ لَهُ الْعَذَابُ يَوْمَ الْقِيَامَةِ وَيَخْلُدْ فِيهِ مُهَانًا
٧٠) إِلَّا مَنْ تَابَ وَآمَنَ وَعَمِلَ عَمَلًا صَالِحًا فَأُولَٰئِكَ يُبَدِّلُ اللَّهُ سَيِّئَاتِهِمْ حَسَنَاتٍ ۗ وَكَانَ اللَّهُ غَفُورًا رَحِيمًا
٧١) وَمَنْ تَابَ وَعَمِلَ صَالِحًا فَإِنَّهُ يَتُوبُ إِلَى اللَّهِ مَتَابًا
٧٢) وَالَّذِينَ لَا يَشْهَدُونَ الزُّورَ وَإِذَا مَرُّوا بِاللَّغْوِ مَرُّوا كِرَامًا
٧٣) وَالَّذِينَ إِذَا ذُكِّرُوا بِآيَاتِ رَبِّهِمْ لَمْ يَخِرُّوا عَلَيْهَا صُمًّا وَعُمْيَانًا
٧٤) وَالَّذِينَ يَقُولُونَ رَبَّنَا هَبْ لَنَا مِنْ أَزْوَاجِنَا وَذُرِّيَّاتِنَا قُرَّةَ أَعْيُنٍ وَاجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا
٧٥) أُولَٰئِكَ يُجْزَوْنَ الْغُرْفَةَ بِمَا صَبَرُوا وَيُلَقَّوْنَ فِيهَا تَحِيَّةً وَسَلَامًا
٧٦) خَالِدِينَ فِيهَا ۚ حَسُنَتْ مُسْتَقَرًّا وَمُقَامًا
٧٧) قُلْ مَا يَعْبَأُ بِكُمْ رَبِّي لَوْلَا دُعَاؤُكُمْ ۖ فَقَدْ كَذَّبْتُمْ فَسَوْفَ يَكُونُ لِزَامًا
[Quran Chapter 25]
62. And it is He who made the night and the day alternate—for whoever desires to reflect, or desires to show gratitude.
63. The servants of the Merciful are those who walk the earth in humility, and when the ignorant address them, they say, "Peace."
64. And those who pass the night prostrating themselves to their Lord and standing up.
65. And those who say, ''Our Lord, avert from us the suffering of Hell, for its suffering is continuous.
66. It is indeed a miserable residence and destination."
67. And those who, when they spend, are neither wasteful nor stingy, but choose a middle course between that.
68. And those who do not implore besides Allah any other god, and do not kill the soul which Allah has made sacred—except in the pursuit of justice—and do not commit adultery. Whoever does that will face penalties.
69. The punishment will be doubled for him on the Day of Resurrection, and he will dwell therein in humiliation forever.
70. Except for those who repent, and believe, and do good deeds. These—Allah will replace their bad deeds with good deeds. Allah is ever Forgiving and Merciful.
71. Whoever repents and acts righteously—has inclined towards Allah with repentance.
72. And those who do not bear false witness; and when they come across indecencies, they pass by with dignity.
73. And those who, when reminded of the revelations of their Lord, do not fall before them deaf and blind.
74. And those who say, "Our Lord, grant us delight in our spouses and our children, and make us a good example for the righteous."
75. Those will be awarded the Chamber (((lofty rooms/dwelling/mansion on high))) for their patience, and will be greeted therein with greetings and peace.
76. Abiding therein forever—it is an excellent residence and destination.
77. Say, "What are you to my Lord without your prayers? You have denied the truth, and the inevitable will happen."
https://goo.gl/imuCXK