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 Messenger of Allah ﷺ!" 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)". (Using translation from Bukhārī 6607)
أَنَّ رَجُلًا كَانَ مِنْ أَعْظَمِ الْمُسْلِمِينَ غَنَاءً عَنِ الْمُسْلِمِينَ فِي غَزْوَةٍ غَزَاهَا مَعَ رَسُولِ اللهِ ﷺ فَنَظَرَ رَسُولُ اللهِ ﷺ فَقَالَ «مَنْ أَحَبَّ أَنْ يَنْظُرَ إِلَى رَجُلٍ مِنْ أَهْلِ النَّارِ فَلْيَنْظُرْ إِلَى هَذَا» فَاتَّبَعَهُ رَجُلٌ مِنَ الْقَوْمِ وَهُوَ عَلَى تِلْكَ الْحَالِ مِنْ أَشَدِّ النَّاسِ عَلَى الْمُشْرِكِينَ حَتَّى جُرِحَ فَاسْتَعْجَلَ الْمَوْتَ فَأَخَذَ ذُبَابَ سَيْفِهِ فَجَعَلَهُ بَيْنَ ثَدْيَيْهِ حَتَّى خَرَجَ مِنْ بَيْنِ كَتِفَيْهِ فَأَقْبَلَ الرَّجُلُ إِلَى رَسُولِ اللهِ ﷺ مُسْرِعًا فَقَالَ أَشْهَدُ أَنَّكَ رَسُولُ اللهِ فَقَالَ رَسُولُ اللهِ ﷺ «وَمَا ذَاكَ؟» قَالَ قُلْتَ «مَنْ أَحَبَّ أَنْ يَنْظُرَ إِلَى رَجُلٍ مِنْ أَهْلِ النَّارِ فَلْيَنْظُرْ إِلَى هَذَا» وَكَانَ مِنْ أَعْظَمِنَا غَنَاءً عَنِ الْمُسْلِمِينَ فَعَرَفْتُ أَنَّهُ لَا يَمُوتَ عَلَى ذَلِكَ فَلَمَّا جُرِحَ اسْتَعْجَلَ الْمَوْتَ فَقَتَلَ نَفْسَهُ فَقَالَ رَسُولُ اللهِ ﷺ عِنْدَ ذَلِكَ «إِنَّ الْعَبْدَ لَيَعْمَلُ عَمَلَ أَهْلِ الْجَنَّةِ وَإِنَّهُ لَمِنْ أَهْلِ النَّارِ وَيَعْمَلُ بِعَمَلِ أَهْلِ النَّارِ وَإِنَّهُ مِنْ أَهْلِ الْجَنَّةِ إِنَّمَا الْأَعْمَالُ بِالْخَوَاتِيمِ»