Qurra bin Iyas reported,

A man came to the Prophet ﷺ accompanied by his son. The Prophet ﷺ asked him, "Do you love him?"The man replied, "May Allah love you as I love him."Later, the boy died. The Prophet ﷺ noticed his absence and asked about him. When he learned of his death, he said, "Would it not please you to find him at every gate of Paradise, hurrying ahead to open it for you?"

Azami 3368

Sahih

عن قرة بن إياس المزني

أن رجلا أتى النبي ﷺ ومعه ابن له، فقال له: أتحبه؟ فقال: أحبك الله كما أحبه، فمات. ففقده فسأل عنه فقال: ما يسرك أن لا تأتى بابا من أبواب الجنة إلا وجدته عنده يسعى ويفتح لك.

الأعظمي 3368صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Patience in tribulation and illness
Section
Whoever had children die and sought reward will enter Paradise
Numbering
Jami al-Kamil 3368 (2nd edition)
Azami 3368