...and joy is a command, which when practiced, leads to contentment and even happiness, regardless of circumstances, though not without opposition or troubles (and some circumstances may need to be changed. God can help with that too).
Jesus said, "My peace I give to you, not as the world gives..." Staying in the rut of old habits, fear, worry, and unforgiveness comes more naturally to us than walking in God's peace, but in reality, the things that come naturally can often make things worse and produce much more difficulty.
Trusting God and walking in his peace is easier said than done, but it can be done, and once achieved, is an ongoing process, but well worth the effort.
Philippians 4:4-9, says:
Rejoice in the Lord always and again I say Rejoice 5: Let your moderation key word “moderation (temperance) be known to all people The Lord is at hand 6: Be careful for (worry about) nothing but in everything by prayer and supplication with thanksgiving let your requests be made known unto God 7: And the peace of God which passes all understanding shall guard [and protect] your hearts and minds through Christ Jesus 8: Finally brethren whatsoever things are true whatsoever things are honest whatsoever things are just whatsoever things are pure whatsoever things are lovely whatsoever things are of good report if there be any virtue and if there be any praise think on these things  9: Those things which you have both learned and received and heard and seen in me do and the God of peace shall be with you
 Verses 4-9 are powerful. Thinking on the impure, remembering the offense, remembering the lie, remembering the unfairness, remembering the ugliness, and focusing on that which is less than excellent leads to crippling bitterness, unforgiveness, depression, anxiety, immoral behavior, abusive behavior, and addictions to many things that lead to destruction. The good news is, that with God’s help, and with the washing of the water of the Word, Christians can rejoice in Him and commit to obedience by thinking on everything that is good. Christians are commanded and empowered to take control of their thoughts. Yes, our thoughts. If it were not possible, God would not require it. But with God all things are possible, and the weapons of our warfare are not natural weapons (yes, it is part of spiritual warfare to take our very thoughts away from the enemy and submit them to Christ). The weapons of our warfare are mighty through God to the pulling down of strongholds, for casting down imaginations, and for bringing every thought into the obedience of Jesus Christ. The promise for doing that is peace. Isn’t peace mental health? Isn’t peace emotional freedom? Peace can even lead to better physical health—science has long made the correlation between mental health and physical health, confirming the the scriptures that say bitterness eats the bones, and laughter is good medicine…. Selah.
The commentary above is an excerpt from
the Hungry Hearts Online Bible Commentary HHBC