Abu Hurairah, Abu Qatadah, and Abu Ibrahim Al-Ash-hali (May Allah be pleased with them) reported:
The Prophet (ﷺ) offered a funeral prayer and said: "Allahummaghfir lihaiyina wa maiyitina, wa saghirina wa kabirina, wa dhakarina wa unthana, wa shahidina wa gha'ibina. Allahumma man ahyaiytahu minna, fa'ahyihi 'alal-Islam, wa man tawaffaiytahu minna, fatawaffahu 'alal-Iman. Allahumma la tahrimna ajrahu, wa la taftinna ba'dahu (O Allah, forgive our living and our dead, our present and our absent, our young and our old, our male and our female. O Allah, whosoever of us You keep alive, keep him alive (faithful) to Islam, and whosoever of us You cause to die, let him die having Iman. O Allah, do not deprive us of our reward (for being patient) and do not subject us to trials after his death."[Abu Dawud and At-Tirmidhi].
App reference: Book 7, Hadith 42
Arabic/English book reference: Book 7, Hadith 936