
1 Thessalonians 5:16-18 (NKJV)16 Rejoice always,17 pray without ceasing,18 in everything give thanks; for this is the will of God in Christ Jesus for you.
The Lord, through the Apostle Paul, tells us here that we are to have an attitude of joy, thanksgiving, and prayer always, no matter the conditions or circumstances that surround us.
How is it possible to rejoice, pray, and give thanks in the wake of the racial injustice, violence, political and social divisiveness, crime, and corruption, wars, insurrection, mass murders, and vilification of immigrants, homosexuals, and transgenders. Yet scripture, which we say is the word of God, tells us that it’s God’s will that we always do these things even in and during times like these. It doesn't matter about your view or opinion it's all personal because individuals are the ones affected. Individuals die, individuals are wounded, individuals are affected physically, emotionally, and spiritually.
It’s easy to say, rejoice, pray, and give thanks we’re in church, surrounded by other Christians, or talking to our Christian friends. It’s easy for us, who are not going through tragic events, to say these things to those who are experiencing tragedy. But when we are the ones affected how is this possible?
This doesn’t mean that we are to thank God for dreadful things. We don’t thank Him for accidents, sickness, tragedy, etc. because He didn’t do or send them. God is not the author of evil that author is the devil, Satan. It’s an insult to God to thank Him for things He didn’t do.
John 8:44 (NKJV) You are of your father the devil, and the desires of your father you want to do. He was a murderer from the beginning, and does not stand in the truth, because there is no truth in him. When he speaks a lie, he speaks from his own resources, for he is a liar and the father of it.
1 John 3:8 (NKJV) He who sins is of the devil, for the devil has sinned from the beginning. For this purpose the Son of God was manifested, that He might destroy the works of the devil.
Satan is good taking a bad situation, which he causes, and blaming it on God. If he can get people to believe the tragedy is from God, he has an easy time in convincing them that God has failed and deserted them. That’s when we hear things like “Why do you serve a God who does or allows these kinds of things”. Satan’s target is your mind and in destroying our faith in God.
What the scripture does mean is that we are to stay joyful no matter what’s happening because we have the Lord, and in Him we overcome no matter what.
Deuteronomy 31:6 (NKJV) Be strong and of good courage, do not fear nor be afraid of them; for the LORD your God, He is the One who goes with you. He will not leave you nor forsake you."
John 16:33 (NKJV) These things I have spoken to you, that in Me you may have peace. In the world you will have tribulation; but be of good cheer, I have overcome the world."

We are to rejoice in the Lord in spite of what Satan or this world system throws at us.
Pierre Teilhard de Chardin, a Jesuit biologist and philosopher, once wrote, “Joy is the infallible sign of the presence of God.”
Dictionary.com defines joy as "the emotion of great delight or happiness caused by something exceptionally good or satisfying; keen pleasure; elation."
Our joy should rise above circumstances. This joy is not produced by something external. It is a supernatural result of a life filled with the Holy Spirit.
James 1:2-3 (NKJV)2 My brethren, count it all joy when you fall into various trials,3 knowing that the testing of your faith produces patience.
Remember what the angel told the shepherds when he announced Jesus’ birth?
Luke 2:10 (NKJV) Then the angel said to them, "Do not be afraid, for behold, I bring you good tidings of great joy which will be to all people.
We have a choice. We can choose to live in an attitude of resentment, anger and fear or we can choose to pursue the joy of Christ. This is a joy that is impossible to describe.
Philippians 4:4-7 (NKJV)4 Rejoice in the Lord always. Again I will say, rejoice!5 Let your gentleness be known to all men. The Lord is at hand.6 Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made known to God;7 and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus.

John 14:15-18 (NKJV)15 "If you love Me, keep My commandments.16 And I will pray the Father, and He will give you another Helper, that He may abide with you forever--17 the Spirit of truth, whom the world cannot receive, because it neither sees Him nor knows Him; but you know Him, for He dwells with you and will be in you.18 I will not leave you orphans; I will come to you.
John 14:25-27 (NKJV)25 "These things I have spoken to you while being present with you.26 But the Helper, the Holy Spirit, whom the Father will send in My name, He will teach you all things, and bring to your remembrance all things that I said to you.27 Peace I leave with you, My peace I give to you; not as the world gives do I give to you. Let not your heart be troubled, neither let it be afraid.

Being thankful always helps us to focus on the fact that God is in control and working all things together for good regardless of how they may seem to us. Our perspective is limited by time and space and God’s perspective has no limits. Because we are thankful and know that God is in control of everything and that He has no limitations we can say with conviction.
Romans 8:28 (NKJV) And we know that all things work together for good to those who love God, to those who are the called according to His purpose.
I don't mean that all your problems go away when you give thanks, but they stop being such a problem. What goes on around you no longer control what’s going on within you. You start to live from the inside out.
Thanksgiving changes our mindset from that of a victim to that of a victor. You can't control the problems that come into your life, but you can control how you respond.
Romans 8:31-39 (NKJV)31 What then shall we say to these things? If God is for us, who can be against us?32 He who did not spare His own Son, but delivered Him up for us all, how shall He not with Him also freely give us all things?33 Who shall bring a charge against God's elect? It is God who justifies.34 Who is he who condemns? It is Christ who died, and furthermore is also risen, who is even at the right hand of God, who also makes intercession for us.35 Who shall separate us from the love of Christ? Shall tribulation, or distress, or persecution, or famine, or nakedness, or peril, or sword?36 As it is written: "For Your sake we are killed all day long; We are accounted as sheep for the slaughter."37 Yet in all these things we are more than conquerors through Him who loved us.38 For I am persuaded that neither death nor life, nor angels nor principalities nor powers, nor things present nor things to come,39 nor height nor depth, nor any other created thing, shall be able to separate us from the love of God which is in Christ Jesus our Lord.
A friend sent me this a few months ago.
Imagine the God of the universe speaking these words to you… ;
Thankfulness takes the sting out of adversity. That is why I have instructed you to give thanks for everything. There is an element of mystery in this transaction: You give Me thanks (regardless of your feelings), and I give you Joy (regardless of your circumstances). This is a spiritual act of obedience—at times, blind obedience. To people who don’t know Me intimately, it can seem irrational and even impossible to thank Me for heartrending hardships. Nonetheless, those who obey Me in this way are invariably blessed, even though difficulties may remain.
Thankfulness opens your heart to My Presence and your mind to My thoughts. You may still be in the same place, with the same set of circumstances, but it is as if a light has been switched on, enabling you to see from My perspective. It is this Light of My Presence that removes the sting from adversity.
Ephesians 5:20 (NKJV) giving thanks always for all things to God the Father in the name of our Lord Jesus Christ,
Yes, with the Holy Spirit who lives within us we can praise God even in tragedy.