Ali ibn Abi Talib reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, Allah is astonished at a servant when he says: There is no God but You, I have wronged myself so forgive me, for none forgives sins but You. Allah says: My servant acknowledges that he has a Lord who forgives and punishes.”
Source: al-Mustadrak ‘alá al-Ṣaḥīḥayn 2482
Grade: Sahih (authentic) according to Al-Albani
عَنْ علي بن أبي طالب قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ إِنَّ اللَّهَ لَيَعْجَبُ إِلَى الْعَبْدِ إِذَا قَالَ لَا إِلَهَ إِلَّا أَنْتَ إِنِّي قَدْ ظَلَمْتُ نَفْسِي فَاغْفِرْ لِي ذُنُوبِي إِنَّهُ لَا يَغْفِرُ الذُّنُوبَ إِلَّا أَنْتَ قَالَ عَبْدِي عَرَفَ أَنَّ لَهُ رَبًّا يَغْفِرُ وَيُعَاقِبُ
2482 المستدرك على الصحيحين كتاب الجهاد وأما حديث عبد الله بن يزيد الأنصاري
1653 المحدث الألباني خلاصة حكم المحدث صحيح في السلسلة الصحيحة