Yahya ibn Abu Kathir reported that Abu Ibarhim Ashhali narrated on the authority of his father that when Allah’s Messenger (SAW) led the funeral salah, he made this supplication:
O Allah! Forgive our living and our dead, those of us who are present and those of us who are absent. The young among us and our old, and our males and our females.
Yahya said further that Abu Salamah ibn Abdur Rahman narrated on the authority of Sayyidina Abu Hurayah (RA) that the Prophet (SAW)said like that and added thereto:
O Allah, those of us whom You spare, cause them to live on Islam and those You take away from us cause them to die on faith.
[Ahmed23554]