It is narrated from Sayyiduna Wathilah bin Asqa’ (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: “Allah Almighty has said: I am as My servant thinks of Me, so let him think of Me as he wishes.”
Brief Explanation
(Commentary on Hadith 2765)
That is, a person should have faith and conviction in Allah Ta'ala's attributes of forgiveness and mercy, and at the same time be mindful of Allah being the Compeller (Al-Jabbar) and the Subduer (Al-Qahhar); then Allah Ta'ala will deal with him with forgiveness and grace, mercy and compassion.
The Divine command is: « ﴿نَبِّئْ عِبَادِي أَنِّي أَنَا الْغَفُورُ الرَّحِيمُ o وَأَنَّ عَذَابِي هُوَ الْعَذَابُ الْأَلِيمُ﴾ [الحجر : 49-50]»
Also: « ﴿إِنَّ رَبَّكَ سَرِيعُ الْعِقَابِ وَإِنَّهُ لَغَفُورٌ رَحِيمٌ﴾ [الانعام : 165]»
And: «﴿إِنَّ بَطْشَ رَبِّكَ لَشَدِيدٌ o إِنَّهُ هُوَ يُبْدِئُ وَيُعِيدُ o وَهُوَ الْغَفُورُ الْوَدُودُ﴾ [البروج: 12-14]»
In all these verses, both types of attributes of Allah Ta'ala are present, and a believing servant keeps both fear and hope in view.