Mishkat al-Masabih 1251
‘Abdallah b. Mas'ud reported God’s Messenger as saying:
Our Lord is pleased with two men. One is a man who gets up from his blanket and his covering from among his beloved and his family to engage in prayer. God says to His angels, “Look at my servant who has got up from his bedding and his blanket from among his beloved and his family to engage in his prayer out of desire for what is with me and fear of what is with me.” The other is a man who goes out on an expedition in God’s path and is routed along with his companions, but who, knowing what responsibility will rest upon him for being routed and what reward he will receive for going back, returns with the result that his blood is spilt. God says to His angels, “Look at my servant who returned out of desire for what is with me and fear of what is with me with the result that his blood was spilt.” 

[Baghawi] transmitted it in Sharh as-sunna .
وَعَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: 
" عَجِبَ رَبُّنَا مِنْ رَجُلَيْنِ رَجُلٌ ثَارَ عَنْ وِطَائِهِ وَلِحَافِهِ مِنْ بَيْنِ حِبِّهِ وَأَهْلِهِ إِلَى صَلَاتِهِ فَيَقُولُ اللَّهُ لِمَلَائِكَتِهِ: انْظُرُوا إِلَى عَبْدِي ثَارَ عَنْ فِرَاشِهِ وَوِطَائِهِ مِنْ بَيْنِ حِبِّهِ وَأَهْلِهِ إِلَى صَلَاتِهِ رَغْبَةً فِيمَا عِنْدِي وَشَفَقًا مِمَّا عِنْدِي وَرَجُلٌ غَزَا فِي سَبِيلِ اللَّهِ فَانْهَزَمَ مَعَ أَصْحَابِهِ فَعَلِمَ مَا عَلَيْهِ فِي الِانْهِزَامِ وَمَا لَهُ فِي الرُّجُوعِ فَرَجَعَ حَتَّى هُرِيقَ دَمُهُ فَيَقُولُ اللَّهُ لِمَلَائِكَتِهِ: انْظُرُوا إِلَى عَبْدِي رَجَعَ رَغْبَةً فِيمَا عِنْدِي وَشَفَقًا مِمَّا عِنْدِي حَتَّى هُرِيقَ دَمُهُ ". رَوَاهُ فِي شَرْحِ السُّنَّةِ