Al-Ilmam bi-Ahadith al-Ahkam 448
وَعَن عبد الله بن أبي قَتَادَة، عَن أَبِيه رَضِيَ اللَّهُ عَنْه أَنه شهد النَّبِي ﷺ صَلَّى عَلَى ميت، قَالَ سمعته يَقُول: " اللَّهُمَّ اغْفِر لحينا وميتنا، وشاهدنا وغائبنا، وصغيرنا وَكَبِيرنَا، وَذكرنَا وأنثانا ، اللَّهُمَّ من أحييته (منا) فأحيه عَلَى الْإِسْلَام، وَمن توفيته (منا) فتوفه عَلَى الْإِيمَان ". أخرجه الْبَيْهَقِيّ.
And from ʿAbdullah ibn Abi Qatadah, from his father, may Allah be pleased with him, that he witnessed the Prophet ﷺ pray over a dead person. He said: I heard him say: "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 (of us) You keep alive, keep him alive upon Islam, and whomever (of us) You take, take him upon faith." Al-Bayhaqi recorded it.