Abu Salamah bin Abd al-Rahman (may Allah have mercy on him) said: I asked Sayyidah Aishah (may Allah be pleased with her) how he (peace and blessings be upon him) used to offer the funeral prayer, that is, how he used to supplicate. She said: He (peace and blessings be upon him) used to say: 'Allahummaghfir li-hayyina wa mayyitina, wa dhakarina wa unthana, wa gha'ibina wa shahidina, wa saghirina wa kabirina, Allahumma man ahyaytahu minna fa-ahyihi alal-Islam, wa man tawaffaytahu minna fa-tawaffahu alal-iman' (O Allah, forgive our living and our dead, our men and our women, our absent and our present, our young and our old. O Allah, whomever of us You keep alive, keep him alive upon Islam, and whomever of us You cause to die, cause him to die upon faith.)
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6973