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.
quran:41:50

And if We let him taste mercy from Us after an adversity which has touched him, he will surely say, "This is ˹due˺ to me, and I do not think the Hour will occur; and ˹even˺ if I should be returned to my Lord, indeed, for me there will be with Him the best." But We will surely inform those who disbelieved about what they did, and We will surely make them taste a massive punishment.  

And if (wa-la-in: the lām is for oaths) We let him taste, ˹if˺ We bestow on him, mercy, ˹such as˺ riches or good health, from Us after the harm, the hardship or tribulation, that had befallen him, he will surely say, ‘This is my due!, in other words, ˹it is˺ on account of what I do. I do not think that the Hour will ever set in, and even if (wa-la-in: the lām is for oaths) I am returned to my Lord, I will indeed have the best ˹reward˺ with Him’, namely, Paradise. But We will assuredly inform those who disbelieve of what they did, and assuredly We will make them taste a harsh chastisement (the lām ˹prefixed˺ in both verbs is that for oaths).
القرآن:٤١:٥٠

وَلَئِنْ أَذَقْنَاهُ رَحْمَةً مِنَّا مِنْ بَعْدِ ضَرَّاءَ مَسَّتْهُ لَيَقُولَنَّ هَٰذَا لِي وَمَا أَظُنُّ السَّاعَةَ قَائِمَةً وَلَئِنْ رُجِعْتُ إِلَىٰ رَبِّي إِنَّ لِي عِنْدَهُ لَلْحُسْنَىٰ ۚ فَلَنُنَبِّئَنَّ الَّذِينَ كَفَرُوا بِمَا عَمِلُوا وَلَنُذِيقَنَّهُمْ مِنْ عَذَابٍ غَلِيظٍ  

{ولئن} لام قسم {أذقناه} آتيناه {رحمة} غنى وصحة {منا من بعد ضراء} شدة وبلاء {مسته ليقولن هذا لي} أي بعلمي {وما أظن الساعة قائمة ولئن} لام قسم {رجعت إلى ربي إن لي عنده للحسنى} أي الجنة {فلننبئن الذين كفروا بما عملوا ولنذيقنهم من عذاب غليظ} شديد، واللام في الفعلين لام قسم.