1 Thess. 5:18 says that we are to "In everything give thanks...". This doesn't come naturally, we have to cultivate this mindset. Our tendency is to be happy in good times and to gripe and complain when things aren't going our way.
A Biblical world-view will help us to obey this Scriptural admonition. The Bible plainly tells us that we are pilgrims & sojourners here. We are not to become too attached to this world or it's ways. In fact, the Bible tells us that "all that is seen is temporal...".
If we will take hold of the truth that God has promised to work all things together for our eternal good, then we can give thanks, even if we do not understand what is going on. This is the essence of faith: Trusting God!
I want to encourage you to something that I did a few years ago; begin a "Thanksgiving Journal". Each day, take time to reflect upon the goodness of God, and ask Him to help you to see the reality of His working in your life. Or, as an old song says, "Count Your Blessings.".
You will soon find that, indeed, it is possible to "in everything give thanks.".
God bless.