Sunan an-Nasa'i, Volume 3, Book 21, Hadith 1874 (DarusSalam)

It was narrated that Anas said: "The Messenger of Allah said: 'There is no Muslim, three of whose children die before reaching puberty, but Allah will admit him to Paradise by virtue of His mercy towards them."'

أَخْبَرَنَا يُوسُفُ بْنُ حَمَّادٍ، قَالَ حَدَّثَنَا عَبْدُ الْوَارِثِ، عَنْ عَبْدِ الْعَزِيزِ، عَنْ أَنَسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَا مِنْ مُسْلِمٍ يُتَوَفَّى لَهُ ثَلاَثَةٌ مِنَ الْوَلَدِ لَمْ يَبْلُغُوا الْحِنْثَ إِلاَّ أَدْخَلَهُ اللَّهُ الْجَنَّةَ بِفَضْلِ رَحْمَتِهِ إِيَّاهُمْ ‏" ‏ ‏.‏

sunnah.com