Sunan an-Nasa'i, Volume 3, Book 21, Hadith 1985 (DarusSalam) ⓘ
It was narrated that 'Awf bin Malik said: "I heard the Messenger of Allah offer the funeral prayer and say: Allahumma ighfir lahu warhamhu wa`fu `anhu wa `afihi, wa akrim nuzulahu wa wassi` mudkhalahu waghsilhu bi-ma'in wa thaljin wa-barad, wa naqqihi min al-khataya kama yunaqqa ath-thawb al-abyad min ad-danas. Wa abdilhu daran khairan min darihi wa ahlan khayran min ahlihi, wa zawjan khayran min zawjihi, wa qihi 'adhab al-qabri wa 'adhab an-nar (O Allah, forgive him and have mercy on him, forgive him and keep him safe and sound, honor the place where he settles and make his entrance wide; wash him with water and snow and hail, and cleanse him of his sin as a white garment is cleansed of dirt. Give him a house better than his house and a family better than his family and a spouse better than his spouse. Protect him from the torment of the grave and the torment of Hell-fire)." 'Awf said: "I wished that I was that deceased person because of the supplication that the Messenger of Allah said for that deceased person."
أَخْبَرَنَا أَحْمَدُ بْنُ عَمْرِو بْنِ السَّرْحِ، عَنِ ابْنِ وَهْبٍ، قَالَ أَخْبَرَنِي عَمْرُو بْنُ الْحَارِثِ، عَنْ أَبِي حَمْزَةَ بْنِ سُلَيْمٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ جُبَيْرٍ، عَنْ أَبِيهِ، عَنْ عَوْفِ بْنِ مَالِكٍ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى عَلَى جَنَازَةٍ يَقُولُ " اللَّهُمَّ اغْفِرْ لَهُ وَارْحَمْهُ وَاعْفُ عَنْهُ وَعَافِهِ وَأَكْرِمْ نُزُلَهُ وَوَسِّعْ مُدْخَلَهُ وَاغْسِلْهُ بِمَاءٍ وَثَلْجٍ وَبَرَدٍ وَنَقِّهِ مِنَ الْخَطَايَا كَمَا يُنَقَّى الثَّوْبُ الأَبْيَضُ مِنَ الدَّنَسِ وَأَبْدِلْهُ دَارًا خَيْرًا مِنْ دَارِهِ وَأَهْلاً خَيْرًا مِنْ أَهْلِهِ وَزَوْجًا خَيْرًا مِنْ زَوْجِهِ وَقِهِ عَذَابَ الْقَبْرِ وَعَذَابَ النَّارِ " . قَالَ عَوْفٌ فَتَمَنَّيْتُ أَنْ لَوْ كُنْتُ الْمَيِّتَ لِدُعَاءِ رَسُولِ اللَّهِ صلى الله عليه وسلم لِذَلِكَ الْمَيِّتِ .
also referenced under: Hadith 1983 (Reference) & Book 21, Hadith 167 (In-Book)