Sahih al-Bukhari, Book 97, Hadith 33 (Bukhari 7122)
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.'"