Sahih al-Bukhari 7404
Book 97: Oneness, Uniqueness of Allah (Tawheed) · Narrated by Abu Huraira
Arabic
حَدَّثَنَا عَبْدَانُ، عَنْ أَبِي حَمْزَةَ، عَنِ الأَعْمَشِ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " لَمَّا خَلَقَ اللَّهُ الْخَلْقَ كَتَبَ فِي كِتَابِهِ ـ هُوَ يَكْتُبُ عَلَى نَفْسِهِ، وَهْوَ وَضْعٌ عِنْدَهُ عَلَى الْعَرْشِ ـ إِنَّ رَحْمَتِي تَغْلِبُ غَضَبِي ".
English translation
Narrated Abu Huraira:The Prophet (ﷺ) said, "When Allah created the Creation, He wrote in His Book--and He wrote (that) about Himself, and it is placed with Him on the Throne--'Verily My Mercy overcomes My Anger
Reference: Sahih al-Bukhari 7404, Book of Oneness, Uniqueness of Allah (Tawheed). English translation by Dr. Muhammad Muhsin Khan.