The Prophet ﷺ said that Allah says, "I am as My servant thinks of Me, and I am with him whenever he calls upon Me."
حدثنا سليمان حدثنا شعبة حدثنا قتادة
أن النبي ﷺ قال يقول الله عز وجل أنا عند ظن عبدي بي وأنا معه إذا دعاني
This isnad is sahih. It was mentioned previously at 9053.