The Prophet ﷺ said, "When Allah created the creation, He wrote with His own hand upon Himself, 'My mercy prevails over My wrath.'"
حدثنا يحيى عن ابن عجلان قال سمعت أبي
عن النبي ﷺ قال لما خلق الله الخلق كتب بيده على نفسه إن رحمتي تغلب غضبي
Its isnad is sahih. Bukhari related it, 9/47, in the Book of Tawhid, chapter on what is mentioned regarding the Divine Essence and Attributes, and Muslim, 4/2107, no. 2751, in the Book of Repentance, chapter on the vastness of Allah's mercy.