The Prophet ﷺ said that Allah said, "I am as My servant thinks of Me, and I am with him whenever he remembers Me."
حدثنا روح حدثنا زهير بن محمد حدثنا زيد بن أسلم عن أبي صالح
عن النبي ﷺ قال قال الله عز وجل أنا عند ظن عبدي وأنا معه حين يذكرني
Its isnad is sahih, it occurred previously at 10202.