He witnessed the Prophet ﷺ praying over a deceased person, and he heard him 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."Yahya added that Abu Salama included in it, "O Allah, whoever among us You keep alive, keep him alive upon Islam, and whoever among us You take in death, take him upon faith."
حدثنا عبد الصمد حدثنا همام حدثنا يحيى بن أبي كثير
أنه شهد النبي ﷺ صلى على ميت فسمعته يقول اللهم اغفر لحينا وميتنا وشاهدنا وغائبنا وصغيرنا وكبيرنا وذكرنا وأنثانا قال يحيى وزاد فيه أبو سلمة اللهم من أحييته منا فأحيه على الإسلام ومن توفيته منا فتوفه على الإيمان
Its isnad is sahih. Hammam is Ibn Yahya bin Dinar Awdhi, a well-known trustworthy narrator whose hadith is found with the whole group of hadith compilers. The hadith has appeared many times before. See 17475.