On the authority of Abu Harayrah (may Allah be pleased with
him), who said that the Prophet (PBUH) said: Allah the Almighty
said:
I am as My servant thinks I am (1). I am with him when he makes
mention of Me. If he makes mention of Me to himself, I make mention
of him to Myself; and if he makes mention of Me in an assembly, I
make mention of him in an assemble better than it. And if he draws
near to Me an arm's length, I draw near to him a fathom's length.
And if he comes to Me walking, I go to him at speed.
(1) Another possible rendering of the Arabic is: "I am as My
servant expects Me to be". The meaning is that forgiveness and
acceptance of repentance by the Almighty is subject to His servant
truly believing that He is forgiving and merciful. However, not to
accompany such belief with right action would be to mock the
Almighty.
It was related by al-Buhkari (also by Muslim, at-Tirmidhi and
Ibn-Majah).