Mishkat al-Masabih 3859
‘Utba b. ‘Abd as-Sulami reported God’s Messenger as saying, “The slain are of three types:
(1) a believer who strives with his property and person in God’s path and when he meets the enemy fights till he is killed. (Of him the Prophet said that that martyr who has suffered trial is in God's tent under- His Throne and is not excelled by the prophets except in the degree of the prophetic office.) (2) A believer who mingles a good deed with another which is evil, who fights with his person and property in God’s path, fighting till he is killed when he meets the enemy. (Of him the Prophet said that it is a cleansing agent which has obliterated his sins and his errors, for the sword obliterates errors, and he will be introduced by whichever of the gates of paradise he wishes.) (3) A hypocrite who strives with his person and property, and when he meets the enemy fights till he is killed; but that one will go to hell, for the sword does not obliterate hypocrisy.” 

Darimi transmitted it.
وَعَن عُتبةَ بن عبدٍ السَّلَميِّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم: 
" الْقَتْلَى ثَلَاثَة: مُؤمن جَاهد نَفسه وَمَالِهِ فِي سَبِيلِ اللَّهِ فَإِذَا لَقِيَ الْعَدُوَّ قَاتَلَ حَتَّى يُقْتَلَ " قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِيهِ: «فَذَلِكَ الشَّهِيدُ الْمُمْتَحَنُ فِي خَيْمَةِ اللَّهِ تَحْتَ عَرْشِهِ لَا يَفْضُلُهُ النَّبِيُّونَ إِلَّا بِدَرَجَةِ النُّبُوَّةِ وَمُؤْمِنٌ خَلَطَ عَمَلًا صَالِحًا وَآخَرَ سَيِّئًا جَاهَدَ بِنَفْسِهِ وَمَالِهِ فِي سَبِيلِ اللَّهِ إِذَا لَقِيَ الْعَدُوَّ قَاتَلَ حَتَّى يُقْتَلَ» قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِيهِ: «مُمَصْمِصَةٌ مَحَتْ ذُنُوبَهُ وَخَطَايَاهُ إِنَّ السَّيْفَ مَحَّاءٌ لِلْخَطَايَا وَأُدْخِلَ مِنْ أَيِّ أَبْوَابِ الْجَنَّةِ شَاءَ وَمُنَافِقٌ جَاهَدَ بِنَفْسِهِ وَمَالِهِ فَإِذَا لَقِيَ الْعَدُوَّ قَاتَلَ حَتَّى يُقْتَلَ فَذَاكَ فِي النَّارِ إِنَّ السيفَ لَا يمحُو النِّفاقَ» . رَوَاهُ الدارميُّ