Authentic Supplication Number 159.

It is reported by way of 'Abi Hurayrata  that the Messenger of Allah  "Used to, if he would pray upon a corpse, say: Allahumma 'ighfir li hayyina wa mayyitina, wa shahidina, wa gha'ibina, wa sagheerina wa kabeerina, wa thakarina wa 'unthana, allahumma men 'ahyaytahu minna fa'ahyihi `ala 'al-'islami, wa men tawaffaytahu minna fatawaffahu `ala 'al-'eemani, allahumma la tahrimna 'ajrahu, wala tudhillana ba`dahu (177).

Footnotes.
(177) O' my ilah forgive our living, and our dead; our present and our absent; our young and our old, our males, and our females. O' my ilah whomever of us you liven then liven him upon Islam, and whomever of us you exact then exact him upon faith. O' my ilah do not forbid us his reward, and do not push us astray afer him.

Reporters.
Al-Albani said, in his 'Ahkam 'Al-Janaiz wa Bida`iha, that it was reported by Ibn Maja, 456/1; Al-Bayhaqi, 41/4; 'Abu Dawood, 68/2; At-Tirmithi, 141/2, and Ibn Hibban in his saheeh (757 - Mawarid). Al-Albani said that Al-Hakim said that it was sound according to the conditions of al-Bukhari, and Muslim, that 'Ath-thahabi agreed; and that so did he.