Yazid bin Rukana reported,

When the Messenger of Allah ﷺ stood to perform the funeral prayer over a deceased person, he would say, "O Allah, Your servant and the son of Your maidservant is in need of Your mercy, and You have no need to punish him. If he was a doer of good, increase his good deeds, and if he was a wrongdoer, overlook his sins."

Azami 11106

Hasan

عن يزيد بن ركانة قال

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

الأعظمي 11106حسن
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 11106 (2nd edition)
Azami 11106