It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that when the Prophet (peace and blessings be upon him) prayed over a deceased person, he would say: "O Allah, forgive our living and our dead, those present and those absent, and our women and our men. Whomever of us You keep alive, keep him alive upon Islam, and whomever You cause to die, cause him to die upon faith. O Allah, (grant us) Your pardon, Your pardon."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12626