Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said:
لَمَّا قَضَى اللَّهُ الْخَلْقَ كَتَبَ فِي كِتَابِهِ فَهُوَ عِنْدَهُ فَوْقَ الْعَرْشِ إِنَّ رَحْمَتِي غَلَبَتْ غَضَبِي
When Allah decreed the creation, he wrote in his Book with him on his Throne: My mercy prevails over my wrath.
Source: Sahih Bukhari 3022