Hadithcore
Mishkat al-Masabih, 3124

Abu Umama reported the Prophet (ﷺ) as saying, “If any Muslim happens to look at a woman’s beauties and then lowers his eyes, God will produce for him an act of worship whose sweetness he will experience.” Ahmad transmitted it.

وَعَنْ أَبِي أُمَامَةَ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «مَا مِنْ مُسْلِمٍ يَنْظُرُ إِلَى مَحَاسِنِ امْرَأَةٍ أَوَّلَ مَرَّةٍ ثُمَّ يَغُضُّ بَصَرَهُ إِلَّا أَحْدَثَ اللَّهُ لَهُ عِبَادَةً يَجِدُ حلاوتها» . رَوَاهُ أَحْمد

References1 variant
In-Book Reference
Book 13, Hadith 45