Sayyiduna Awf bin Malik (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) led a funeral prayer, and I memorised his (peace and blessings be upon him) supplication; he (peace and blessings be upon him) supplicated: 'Allahummaghfir lahu warhamhu wa afihi wa'fu anhu, wa akrim nuzulahu, wa wassi' alayhi mudkhalahu, waghsilhu bil-ma'i wath-thalji wal-barad, wa naqqihi minal-khataya kama yunaqqath-thawbul-abyadu minad-danas, wa abdilhu daran khayran min darihi, wa ahlan khayran min ahlihi, wa zawjatan khayran min zawjatihi, wa adkhilhul-jannah, wa a'idhhu min adhabil-qabri wa min adhabin-nar' (O Allah, forgive him and have mercy on him, pardon him and overlook his faults, elevate his station and make his grave spacious, wash him with water, snow and hail, and cleanse him of sins as a garment is cleansed of dirt; exchange his home for a better home, his family for a better family, and his spouse for a better spouse; admit him into Paradise, and protect him from the punishment of the grave and the punishment of Hell), until I wished that I had been that deceased.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6965