Suhayb reported,

The Messenger of Allah ﷺ said, "How remarkable is the affair of the believer! All of his affairs are good, and this is not the case for anyone except the believer. If something pleasing befalls him, he gives thanks, and that is good for him. If something harmful befalls him, he endures it patiently, and that is good for him."

Azami 12547

Sahih

عن صهيب قال

قال رسول الله ﷺ: عجبا لأمر المؤمن، إن أمره كله خير، وليس ذاك لأحد إلا للمؤمن، إن أصابته سراء شكر فكان خيرا له، وإن أصابته ضراء صبر فكان خيرا له.

الأعظمي 12547صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "And if We give man a taste of mercy from Us and then withdraw it from him, indeed he is despairing and ungrateful. And if We give him a taste of favor after hardship has touched him, he will surely say, 'The bad times have gone from me.' Indeed he is exultant and boastful. Except for those who are patient and do righteous deeds, for them is forgiveness and a great reward."
Numbering
Jami al-Kamil 12547 (2nd edition)
Azami 12547