The Prophet ﷺ used to say, "Allah, make me among those who, when they do good, rejoice, and when they do wrong, seek forgiveness."
حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون عن حماد بن سلمة عن علي بن زيد عن أبي عثمان
أن النبي ﷺ كان يقول اللهم اجعلني من الذين إذا أحسنوا استبشروا وإذا أساءوا استغفروا
[Hasan] Ahmad narrated it, 6/145, 239, from Yazid through the same chain, and Affan followed him (Ahmad 6/129), as did others, but its chain is daif, no. 1660, because of Ali bin Zayd bin Jadan, as mentioned previously, no. 116. It has a hasan corroborating witness in Bayhaqi's Shuab al-Iman, no. 6992. See Mishkat with my verification, no. 2357.