Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Allah عز وجل says, 'I am as My servant thinks of Me, and I am with him whenever he remembers Me. If he remembers Me within himself, I remember him within Myself. If he remembers Me in a gathering, I remember him in a gathering better than theirs. If he draws near to Me by a hand's span, I draw near to him by a cubit. If he draws near to Me by a cubit, I draw near to him by an arm's length. And if he comes to Me walking, I come to him at speed.'"

Muslim 6805

Sahih

حدثنا قتيبة بن سعيد وزهير بن حرب واللفظ لقتيبة قالا حدثنا جرير عن الأعمش عن أبي صالح

عن أبي هريرة قال

قال رسول الله ﷺ يقول الله عز وجل أنا عند ظن عبدي بي وأنا معه حين يذكرني إن ذكرني في نفسه ذكرته في نفسي وإن ذكرني في ملإ ذكرته في ملإ هم خير منهم وإن تقرب مني شبرا تقربت إليه ذراعا وإن تقرب إلي ذراعا تقربت منه باعا وإن أتاني يمشي أتيته هرولة

مسلم 6805صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
Encouragement to remember Allah
Numbering
Darussalam 6805
Muslim 6805