Al-Ilmam bi-Ahadith al-Ahkam 447
وَعَن عَوْف بن مَالك رَضِيَ اللَّهُ عَنْه قَالَ: " صَلَّى رَسُول الله ﷺ عَلَى جَنَازَة فَحفِظت من دُعَائِهِ وَهُوَ يَقُول: اللَّهُمَّ، اغْفِر لَهُ وارحمه، وعافه واعف عَنهُ، وَأكْرم نُزله، ووسِّع مدخله، واغسله بِالْمَاءِ والثلج وَالْبرد، ونقه من الْخَطَايَا كَمَا ينقى الثَّوْب الْأَبْيَض من الدنس، وأبدله دَارا خيرا من دَاره، وَأهلا خيرا من أَهله، وزوجاً خيرا من زوجه، وَأدْخلهُ الْجنَّة، وأعذه من عَذَاب الْقَبْر، وَمن عَذَاب النَّار. قَالَ : حَتَّى تمنيت أَن أكون أَنا ذَلِك الْمَيِّت ". أخرجه مُسلم.
And from ʿAwf ibn Malik, may Allah be pleased with him, who said: "The Messenger of Allah ﷺ prayed over a funeral, and I memorised from his supplication, as he was saying: 'O Allah, forgive him and have mercy on him, keep him safe and pardon him, honour his reception and make his entrance wide, wash him with water, snow and hail, and cleanse him of sins as a white garment is cleansed of dirt. Give him in exchange a home better than his home, a family better than his family and a spouse better than his spouse. Admit him to Paradise and protect him from the punishment of the grave and from the punishment of the Fire.'" He said: "Until I wished that I were that dead person." Muslim recorded it.