Sahl bin Saad reported,

The Messenger of Allah ﷺ met the polytheists in battle, and the two sides fought. When the Messenger of Allah ﷺ withdrew to his camp and the others withdrew to theirs, there was among the companions of the Messenger of Allah ﷺ a man who would not leave any straggler or isolated enemy without pursuing him and striking him down with his sword.The companions said, "No one among us has done as much today as so-and-so."The Messenger of Allah ﷺ said, "He is actually among the people of the Fire."A man from the group said, "I will be his companion."So he went out with him. Whenever the man stopped, he stopped with him, and whenever he hurried, he hurried with him. Eventually the man received a severe wound, and wishing to hasten his death, he planted the blade of his sword on the ground with its tip between his breasts, then leaned on it and killed himself.The other man went to the Messenger of Allah ﷺ and said, "I bear witness that you are the Messenger of Allah."He asked, "What is the matter?"The man replied, "The man you mentioned earlier as being among the people of the Fire, the people found that very hard to accept, so I said, 'I will track him for you.' I went out searching for him. Then he received a severe wound, and wishing to hasten his death, he planted the blade of his sword on the ground with its tip between his breasts, then leaned on it and killed himself."At that, the Messenger of Allah ﷺ said, "A man may do the deeds of the people of Paradise, as it appears to people, while he is among the people of the Fire. And a man may do the deeds of the people of the Fire, as it appears to people, while he is among the people of Paradise."

Bukhari 2898

Sahih

حدثنا قتيبة حدثنا يعقوب بن عبد الرحمن عن أبي حازم

عن سهل بن سعد الساعدي رضي الله عنه

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

البخاري 2898صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
One should not say "So-and-so is a martyr"
Numbering
Darussalam 2898
Bukhari 2898