Abu Hurairah reported,

Whenever the Messenger of Allah ﷺ prayed over a funeral, he would say, "O Allah, forgive our living and our dead, those present among us and those absent, our young and our old, our males and our females. O Allah, whomever among us You keep alive, let him live upon Islam, and whomever among us You take in death, take him upon faith. O Allah, do not deprive us of his reward and do not lead us astray after him."

Ibn Majah 1498

Hasan

حدثنا سويد بن سعيد حدثنا علي بن مسهر عن محمد بن إسحق عن محمد بن إبراهيم عن أبي سلمة

عن أبي هريرة قال

كان رسول الله ﷺ إذا صلى على جنازة يقول اللهم اغفر لحينا وميتنا وشاهدنا وغائبنا وصغيرنا وكبيرنا وذكرنا وأنثانا اللهم من أحييته منا فأحيه على الإسلام ومن توفيته منا فتوفه على الإيمان اللهم لا تحرمنا أجره ولا تضلنا بعده

ابن ماجه 1498حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Funerals
Chapter
Supplication in the funeral prayer
Numbering
Darussalam 1498
Ibn Majah 1498