Narrated Abu Huraira
We witnessed along with Allah's Messenger (ﷺ) the Khaibar (campaign). Allah's Messenger (ﷺ) told his companions about a man who claimed to be a Muslim, "This man is from the people of the Fire." When the battle started, the man fought very bravely and received a great number of wounds and got crippled. On that, a man from among the companions of the Prophet (ﷺ) came and said, "O Allah's Apostle! Do you know what the man you described as of the people of the Fire has done? He has fought very bravely for Allah's Cause and he has received many wounds." The Prophet (ﷺ) said, "But he is indeed one of the people of the Fire." Some of the Muslims were about to have some doubt about that statement. So while the man was in that state, the pain caused by the wounds troubled him so much that he put his hand into his quiver and took out an arrow and committed suicide with it. Off went some men from among the Muslims to Allah's Messenger (ﷺ) and said, "O Allah's Messenger (ﷺ)! Allah has made your statement true. So-and-so has committed suicide." Allah's Messenger (ﷺ) said, "O Bilal! Get up and announce in public: None will enter Paradise but a believer, and Allah may support this religion (Islam) with a wicked man."
Narrated Sahl bin Sa`d
There was a man who fought most bravely of all the Muslims on behalf of the Muslims in a battle (Ghazwa) in the company of the Prophet. The Prophet (ﷺ) looked at him and said. "If anyone would like to see a man from the people of the Fire, let him look at this (brave man)." On that, a man from the People (Muslims) followed him, and he was in that state i.e., fighting fiercely against the pagans till he was wounded, and then he hastened to end his life by placing his sword between his breasts (and pressed it with great force) till it came out between his shoulders. Then the man (who was watching that person) went quickly to the Prophet (ﷺ) and said, "I testify that you are Allah's Messenger (ﷺ)!" The Prophet (ﷺ) asked him, "Why do you say that?" He said, "You said about so-and-so, 'If anyone would like to see a man from the people of the Fire, he should look at him.' He fought most bravely of all of us on behalf of the Muslims and I knew that he would not die as a Muslim (Martyr). So when he got wounded, he hastened to die and committed suicide." There-upon the Prophet (ﷺ) said, "A man may do the deeds of the people of the Fire while in fact he is one of the people of Paradise, and he may do the deeds of the people of Paradise while in fact he belongs to the people of Fire, and verily, (the rewards of) the deeds are decided by the last actions (deeds)".