Sahih al-Bukhari, Hadith 7505 ⓘ
Narrated Abu Huraira: Allah's Messenger said, "Allah said, 'I am to my slave as he thinks of Me, (i.e. I am able to do for him what he thinks I can do for him). (See Hadith No. 502)
حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، حَدَّثَنَا أَبُو الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " قَالَ اللَّهُ أَنَا عِنْدَ ظَنِّ عَبْدِي بِي " .
also referenced under: Book 97, Hadith 130 (In-Book) & Volume 9, Book 93, Hadith 596 (USC-MSA)