Abu Yahya Suhaib bin Sinan (May Allah be pleased with him) reported that:
The Messenger of Allah (ﷺ) said, "How wonderful is the case of a believer; there is good for him in everything and this applies only to a believer. If prosperity attends him, he expresses gratitude to Allah and that is good for him; and if adversity befalls him, he endures it patiently and that is better for him".[Muslim].
Arabic/English book reference: Book 1, Hadith 27