Abu Hurairah reported,

The Prophet ﷺ said, "O Allah, this is Your servant and the son of Your servant. He used to bear witness that there is no god but You, and that Muhammad is Your servant and Messenger, and You know him best. If he was a doer of good, then increase him in his goodness, and if he was a wrongdoer, then forgive him. Do not deprive us of his reward, and do not lead us astray after him."

Azami 11105

Sahih

عن أبي هريرة

عن النبي ﷺ قال: اللهم عبدك وابن عبدك، كان يشهد أن لا إله إلا أنت، وأن محمدا عبدك ورسولك، وأنت أعلم به، إن كان محسنا فزده في إحسانه، وإن كان مسيئا فاغفر له، ولا تحرمنا أجره ولا تفتنا بعده.

الأعظمي 11105صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for illness and funerals, and what relates to them
Section
Supplication for the deceased in the funeral prayer
Numbering
Jami al-Kamil 11105 (2nd edition)
Azami 11105