Sayyiduna Abdullah bin Abi Qatadah narrates from his father (may Allah be pleased with them both) that he was present with the Prophet (peace and blessings be upon him) at a funeral. He said: I heard him (peace and blessings be upon him) say: 'Allahummaghfir li-hayyina wa mayyitina wa shahidina wa gha'ibina wa saghirina wa kabirina wa dhakarina wa unthana' (O Allah, forgive our living and our dead, those of us who are present and those who are absent, our young and our old, and our men and our women.) And Abu Salamah (may Allah have mercy on him) added along with these words: 'Wa man ahyaytahu minna fa-ahyihi alal-Islam, wa man tawaffaytahu minna fa-tawaffahu alal-iman' (And whomever of us You keep alive, keep him alive upon Islam, and whomever You cause to die, grant him death upon faith.)
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6974