Ibn Qayyim al-Jawziyyah said:
“… when blessed, give thanks; when tried, preserve; and when sinful, seek forgiveness. For these three conditions are tokens of the servant’s happiness..”
[Al-Wabil Al-Sayyib pg. 1]