Hadithcore
Mishkat al-Masabih, 2367

Abu Huraira reported God’s messenger as saying, “If the believer knew the punishment God has prepared, no one would hope for His paradise; and if the infidel knew the extent of His mercy, no one would despair of attaining His paradise.” (Bukhari and Muslim.)

وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَوْ يَعْلَمُ الْمُؤْمِنُ مَا عِنْدَ اللَّهِ مِنَ الْعُقُوبَةِ مَا طَمِعَ بِجَنَّتِهِ أَحَدٌ وَلَوْ يُعْلَمُ الْكَافِرُ مَا عِنْدَ اللَّهِ مِنَ الرَّحْمَةِ مَا قَنَطَ من جنته أحد»

References1 variant
In-Book Reference
Book 9, Hadith 139