Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:7091Abū Zakariyyā b. Abū Isḥāq Fī Ākharīn > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > al-Qāsim b. ʿAbdullāh b. ʿUmar > Jaʿfar b. Muḥammad from his father from his grandfather > Lammā

[Machine] When the Messenger of Allah ﷺ passed away and condolences were being given, they heard someone saying, "Indeed, in Allah there is consolation from every affliction, a successor from every perishing, and what you have missed out on can still be achieved. So rely on Allah and hope in Him, for the one who is deprived of reward is truly the one who is afflicted." This narration has also been reported from another perspective by Jafar, on the authority of his father, on the authority of Ja'bir, and from another perspective by Anas ibn Malik. However, the chains of narration in these versions are weak and Allah knows best.  

البيهقي:٧٠٩١أَخْبَرَنَا أَبُو زَكَرِيَّا بْنُ أَبِي إِسْحَاقَ فِي آخَرِينَ قَالُوا ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنبأ الرَّبِيعُ بْنُ سُلَيْمَانَ أنبأ الشَّافِعِيُّ أنبأ الْقَاسِمُ بْنُ عَبْدِ اللهِ بْنِ عُمَرَ عَنْ جَعْفَرِ بْنِ مُحَمَّدٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ

لَمَّا تُوُفِّيَ رَسُولُ اللهِ ﷺ وَجَاءَتِ التَّعْزِيَةُ سَمِعُوا قَائِلًا يَقُولُ إِنَّ فِي اللهِ عَزَاءً مِنْ كُلِّ مُصِيبَةٍ وَخَلَفًا مِنْ كُلِّ هَالِكٍ وَدَرَكًا مِنْ كُلِّ مَا فَاتَ فَبِاللهِ فَثِقُوا وَإِيَّاهُ فَارْجُوا فَإِنَّ الْمُصَابَ مَنْ حُرِمَ الثَّوَابَ وَقَدْ رُوِيَ مَعْنَاهُ مِنْ وَجْهٍ آخَرَ عَنْ جَعْفَرٍ عَنْ أَبِيهِ عَنْ جَابِرٍ وَمِنْ وَجْهٍ آخَرَ عَنْ أَنَسِ بْنِ مَالِكٍ وَفِي أَسَانِيدِهِ ضَعْفٌ وَاللهُ أَعْلَمُ