The Prophet ﷺ said that Allah says, "I am as My servant thinks of Me, and I am with him whenever he calls upon Me."
حدثنا أبو داود حدثنا شعبة حدثنا قتادة
أن النبي ﷺ قال يقول الله عز وجل أنا عند ظن عبدي بي وأنا معه إذا دعاني
Its chain of transmission is sahih, and it has previously appeared at 13125.