We are to be thankful for all things, good and bad, no matter what our current circumstance. God is in control. He will help us through it and we can get something good from the experience. There is a purpose for all that we experience in life.
1 Thessalonians 5
16 Be joyful always, 17 pray at all times, 18 be thankful in all circumstances. This is what God wants from you in your life in union with Christ Jesus.