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.' (Using translation from Bukhārī 3062)
شَهِدْنَا مَعَ رَسُولِ اللهِ ﷺ يَوْمَ خَيْبَرَ فَقَالَ يَعْنِي لِرَجُلٍ يَدَّعِي بِالْإِسْلَامِ هَذَا مِنْ أَهْلِ النَّارِ فَلَمَّا حَضَرْنَا الْقِتَالَ قَاتَلَ الرَّجُلُ قِتَالًا شَدِيدًا فَأَصَابَتْهُ جِرَاحَةٌ فَقِيلَ يَا رَسُولَ اللهِ الرَّجُلُ الَّذِي قُلْتَ لَهُ إِنَّهُ مِنْ أَهْلِ النَّارِ فَإِنَّهُ قَاتَلَ الْيَوْمَ قِتَالًا شَدِيدًا وَقَدْ مَاتَ فَقَالَ النَّبِيُّ ﷺ إِلَى النَّارِ فَكَادَ بَعْضُ النَّاسِ أَنْ يَرْتَابَ فَبَيْنَمَا هُمْ عَلَى ذَلِكَ إِذْ قِيلَ فَإِنَّهُ لَمْ يَمُتْ وَلَكِنْ بِهِ جِرَاحٌ شَدِيدٌ فَلَمَّا كَانَ مِنَ اللَّيْلِ لَمْ يَصْبِرْ عَلَىالْجِرَاحِ فَقَتَلَ نَفْسَهُ فَأُخْبِرَ النَّبِيُّ ﷺ بِذَلِكَ فَقَالَ اللهُ أَكْبَرُ أَشْهَدُ أَنِّي عَبْدُ اللهِ وَرَسُولُهُ ثُمَّ أَمَرَ بِلَالًا فَنَادَى فِي النَّاسِ أَنَّهُ لَا يَدْخُلُ الْجَنَّةَ إِلَّا نَفْسٌ مُسْلِمَةٌ وَأَنَّ اللهَ يُؤَيِّدُ هَذَا الدِّينَ بِالرَّجُلِ الْفَاجِرِ