The Messenger of Allah ﷺ said that Allah declares, "I am as My servant thinks of Me. If he thinks good of Me, then good is his, and if he thinks evil of Me, then evil is his."
عن رسول الله ﷺ: إن الله جل وعلا يقول: أنا عند ظن عبدي بي، إن ظن خيرا فله، وإن ظن شرا فله.
Ibn Hibban (639) narrated it from Abdullah bin Muhammad bin Salm, who said, Harmala bin Yahya narrated to us, who said, Ibn Wahb narrated to us, who said, Amr bin Harith informed me, and Ibn Salm mentioned another narrator alongside him, that Abu Yunus reported to them, from Abu Hurairah, and he related the hadith. Its chain of transmission is sahih.Imam Ahmad also narrated it (9076) through another route, from Hasan bin Musa, who said, Ibn Lahia narrated to us, who said, Abu Yunus narrated to us, from Abu Hurairah, and he related the hadith. There is well known criticism regarding Ibn Lahia, but he is corroborated, as mentioned previously.