Hayan Abu Nadr reported,

Wathila bin Asqa visited Abu Aswad al-Jurashi during the illness from which he died. He greeted him and sat down. Abu Aswad took Wathila's right hand and wiped it over his eyes and face, because Wathila had pledged allegiance with it to the Messenger of Allah ﷺ.Wathila said to him, "There is one thing I want to ask you about."Abu Aswad replied, "What is it?"Wathila asked, "How do you think of your Lord?"Abu Aswad gestured with his head, meaning, well.Wathila said, "Then receive good news, for I heard the Messenger of Allah ﷺ say, 'Allah عز وجل said, I am as My servant thinks of Me, so let him think of Me whatever he wishes.'"

Azami 3520

Sahih

عن حيان أبي النضر قال

دخلت واثلة بن الأسقع مع على أبي الأسود الجرشي في مرضه الذي مات فيه فسلم عليه وجلس، قال: فأخذ أبو الأسود يمين واثلة فمسح بها على عينيه ووجهه لبيعته بها رسول الله ﷺ، فقال له واثلة: واحدة أسألك عنها. قال: وما هي؟ قال: كيف ظنك بربك؟ قال: فقال أبو الأسود: وأشار برأسه- أي حسن. قال واثلة: أبشر إني سمعت رسول الله ﷺ يقول: قال الله عز وجل: أنا عند ظن عبدي بي، فليظن بي ما شاء.

الأعظمي 3520صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Dying person
Section
Commanding good thoughts about Allah at the time of death
Numbering
Jami al-Kamil 3520 (2nd edition)
Azami 3520