30:36
وَإِذَآ أَذَقْنَا ٱلنَّاسَ رَحْمَةً فَرِحُوا۟ بِهَا ۖ وَإِن تُصِبْهُمْ سَيِّئَةٌۢ بِمَا قَدَّمَتْ أَيْدِيهِمْ إِذَا هُمْ يَقْنَطُونَ
wa-idhā adhaqnā l-nāsa raḥmatan fariḥū bihā wa-in tuṣib'hum sayyi-atun bimā qaddamat aydīhim idhā hum yaqnaṭūna
When We give people a taste of Our blessing, they rejoice, but when something bad happens to them- because of their own actions- they fall into utter despair.
And when We cause mankind to taste of mercy, they rejoice therein; but when some evil afflicts them because of (evil deeds and sins) that their (own) hands have sent forth, behold, they are in despair!