as follows in Hadith 297. Narrated Abu Huraira: We were in the company of Messenger of Allah ﷺ in a Ghazwa, and he remarked about a man who claimed to be a Muslim, saying, "This (man) is from the people of the (Hell) Fire." When the battle started, the man fought violently till he got wounded. Somebody said, "O Messenger of Allah ﷺ! The man whom you described as being from the people of the (Hell) Fire fought violently today and died." The Prophet ﷺ said, "He will go to the (Hell) Fire." Some people were on the point of doubting (the truth of what the Prophet had said) while they were in this state, suddenly someone said that he was still alive but severely wounded. When night fell, he lost patience and committed suicide. The Prophet ﷺ was informed of that, and he said, "Allah is Greater! I testify that I am Allah's Slave and His Apostle." Then he ordered Bilal to announce amongst the people: 'None will enter Paradise but a Muslim, and Allah may support this religion (i.e. Islam) even with a disobedient man.'
شَهِدْنَا مَعَ رَسُولِ اللَّهِ ﷺ فَقَالَ لِرَجُلٍ مِمَّنْ يَدَّعِي الإِسْلاَمَ هَذَا مِنْ أَهْلِ النَّارِ فَلَمَّا حَضَرَ الْقِتَالُ قَاتَلَ الرَّجُلُ قِتَالاً شَدِيدًا فَأَصَابَتْهُ جِرَاحَةٌ فَقِيلَ يَا رَسُولَ اللَّهِ الَّذِي قُلْتَ إِنَّهُ مِنْ أَهْلِ النَّارِ فَإِنَّهُ قَدْ قَاتَلَ الْيَوْمَ قِتَالاً شَدِيدًا وَقَدْ مَاتَ فَقَالَ النَّبِيُّ ﷺ إِلَى النَّارِ قَالَ فَكَادَ بَعْضُ النَّاسِ أَنْ يَرْتَابَ فَبَيْنَمَا هُمْ عَلَى ذَلِكَ إِذْ قِيلَ إِنَّهُ لَمْ يَمُتْ وَلَكِنَّ بِهِ جِرَاحًا شَدِيدًا فَلَمَّا كَانَ مِنَ اللَّيْلِ لَمْ يَصْبِرْ عَلَى الْجِرَاحِ فَقَتَلَ نَفْسَهُ فَأُخْبِرَ النَّبِيُّ ﷺ بِذَلِكَ فَقَالَ اللَّهُ أَكْبَرُ أَشْهَدُ أَنِّي عَبْدُ اللَّهِ وَرَسُولُهُ ثُمَّ أَمَرَ بِلاَلاً فَنَادَى بِالنَّاسِ إِنَّهُ لاَ يَدْخُلُ الْجَنَّةَ إِلاَّ نَفْسٌ مُسْلِمَةٌ وَإِنَّ اللَّهَ لَيُؤَيِّدُ هَذَا الدِّينَ بِالرَّجُلِ الْفَاجِرِ