Abu Hurairah reported,

We were present with the Messenger of Allah ﷺ on the day of Khaybar. He said, referring to a man who claimed to be a Muslim, "This one is among the people of the Fire."When the battle began, the man fought fiercely and was wounded. Someone said, "Messenger of Allah, the man you said was among the people of the Fire fought fiercely today and has died."The Prophet ﷺ said, "To the Fire."Some people were on the verge of doubting, when, while they were in that state, it was said, "He has not died, but he has severe wounds."When night came, he could not endure the pain of his wounds and killed himself. The Prophet ﷺ was informed of this and said, "Allahu Akbar. I bear witness that I am the servant of Allah and His Messenger."Then he ordered Bilal to announce to the people that none shall enter Paradise except a Muslim soul, and that Allah عز وجل supports this religion even by means of a wicked man.

Ahmad 8090

Sahih

حدثنا عبد الرزاق حدثنا معمر عن الزهري عن ابن المسيب

عن أبي هريرة قال

شهدنا مع رسول الله ﷺ يوم خيبر فقال يعني لرجل يدعي الإسلام هذا من أهل النار فلما حضرنا القتال قاتل الرجل قتالا شديدا فأصابته جراحة فقيل يا رسول الله الرجل الذي قلت له إنه من أهل النار فإنه قاتل اليوم قتالا شديدا وقد مات فقال النبي ﷺ إلى النار فكاد بعض الناس أن يرتاب فبينما هم على ذلك إذ قيل فإنه لم يمت ولكن به جراح شديد فلما كان من الليل لم يصبر على الجراح فقتل نفسه فأخبر النبي ﷺ بذلك فقال الله أكبر أشهد أني عبد الله ورسوله ثم أمر بلالا فنادى في الناس أنه لا يدخل الجنة إلا نفس مسلمة وأن الله عز وجل يؤيد هذا الدين بالرجل الفاجر

أحمد 8090صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 8090
Ahmad 8090