Sunan an-Nasa'i, Volume 3, Book 21, Hadith 2090 (DarusSalam) ⓘ
Mu 'awiyah bin Qurrah narrated that his father said: "When the Prophet of Allah sat, some of his Companions would sit with him. Among them was a man who had a little son who used to come to him from behind, and he would make him sit in front of him. He (the child) died, and the man stopped attending the circle because it reminded him of his son, and made him feel sad. The Prophet missed him and said: 'Why do I not see so-and-so?' They said: O Messenger of Allah, his son whom you saw has died.' The Prophet met him and asked him about his son, and he told him that he had died. He offered his condolences and said: 'O son-and-so, which would you like better, to enjoy his company all you life, or to come to any of the gates of Paradise on the Day of Resurrection, and find that he arrived there before you, and he is opening the gate for you?' he said: 'O Prophet of Allah! For him to get to the gate of Paradise before me and open it for me is dearer to me.' He said: 'You will have that."'
أَخْبَرَنَا هَارُونُ بْنُ زَيْدٍ، - وَهُوَ ابْنُ أَبِي الزَّرْقَاءِ - قَالَ حَدَّثَنَا أَبِي قَالَ، حَدَّثَنَا خَالِدُ بْنُ مَيْسَرَةَ، قَالَ سَمِعْتُ مُعَاوِيَةَ بْنَ قُرَّةَ، عَنْ أَبِيهِ، قَالَ كَانَ نَبِيُّ اللَّهِ صلى الله عليه وسلم إِذَا جَلَسَ يَجْلِسُ إِلَيْهِ نَفَرٌ مِنْ أَصْحَابِهِ وَفِيهِمْ رَجُلٌ لَهُ ابْنٌ صَغِيرٌ يَأْتِيهِ مِنْ خَلْفِ ظَهْرِهِ فَيُقْعِدُهُ بَيْنَ يَدَيْهِ فَهَلَكَ فَامْتَنَعَ الرَّجُلُ أَنْ يَحْضُرَ الْحَلْقَةَ لِذِكْرِ ابْنِهِ فَحَزِنَ عَلَيْهِ فَفَقَدَهُ النَّبِيُّ صلى الله عليه وسلم فَقَالَ " مَا لِي لاَ أَرَى فُلاَنًا " . قَالُوا يَا رَسُولَ اللَّهِ بُنَيَّهُ الَّذِي رَأَيْتَهُ هَلَكَ . فَلَقِيَهُ النَّبِيُّ صلى الله عليه وسلم فَسَأَلَهُ عَنْ بُنَيِّهِ فَأَخْبَرَهُ أَنَّهُ هَلَكَ فَعَزَّاهُ عَلَيْهِ ثُمَّ قَالَ " يَا فُلاَنُ أَيُّمَا كَانَ أَحَبُّ إِلَيْكَ أَنْ تَمَتَّعَ بِهِ عُمْرَكَ أَوْ لاَ تَأْتِي غَدًا إِلَى بَابٍ مِنْ أَبْوَابِ الْجَنَّةِ إِلاَّ وَجَدْتَهُ قَدْ سَبَقَكَ إِلَيْهِ يَفْتَحُهُ لَكَ " . قَالَ يَا نَبِيَّ اللَّهِ بَلْ يَسْبِقُنِي إِلَى بَابِ الْجَنَّةِ فَيَفْتَحُهَا لِي لَهُوَ أَحَبُّ إِلَىَّ . قَالَ " فَذَاكَ لَكَ " .
also referenced under: Hadith 2088 (Reference) & Book 21, Hadith 272 (In-Book)