وَعَنْهُ أَيْضًا قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِذَا صَلَّى عَلَى الْجَنَازَةِ قَالَ: ((اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَصَغِيرِنَا وَكَبِيرِنَا وَذَكَرِنَا وَأُنْثَانَا، اللَّهُمَّ مَنْ أَحْيَيْتَهُ مِنَّا فَأَحْيِهِ عَلَى الْإِسْلَامِ، وَمَنْ تَوَفَّيْتَهُ مِنَّا فَتَوَفَّهُ عَلَى الْإِيمَانِ))
It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) would perform the funeral prayer for someone, he would supplicate: O Allah! Forgive our living and our dead, those present and those absent, our young and our old, our males and our females. O Allah! Whomever You keep alive from among us, keep him alive upon Islam, and whomever You cause to die from among us, cause him to die upon faith. (O Allah! Forgive our living and deceased, those present and those absent, our young and our old, and our males and our females. O Allah! Whomever You wish to keep alive from among us, keep him alive upon Islam, and whomever You wish to cause to die, cause him to die upon faith.)