The Prophet ﷺ said, "No man loses three children to death and then enters the Fire, except for the brief crossing required by the oath."
حدثنا أبو بكر بن أبي شيبة حدثنا سفيان بن عيينة عن الزهري عن سعيد بن المسيب
عن النبي ﷺ قال لا يموت لرجل ثلاثة من الولد فيلج النار إلا تحلة القسم
Bukhari narrated it in the Book of Funerals, chapter, "The merit of one whose child dies and he bears it with patience seeking Allah's reward," hadith no. 1251, and Muslim narrated it in the Book of Righteousness and Maintaining Ties of Kinship, chapter, "The merit of one whose child dies and he bears it with patience seeking Allah's reward," hadith no. 2633, from the hadith of Sufyan through the same chain.