If you are a Christian, God commands you to:
Rejoice in the Lord always. (Philippians 4:4)
That is not a cheap, pious platitude unrealistically out-of-touch with the hardness and heartbreaks of life in this fallen world. It means (
precisely in light of the hardness and heartbreaks of life in this fallen world) He is THAT committed to your joy! It means his blood-bought promises are THAT sweet and powerful!
If you are a Christian toying with idolatry, God also commands you to:
Rejoice not...! Exult not like the peoples; for you have played the whore, forsaking your God. (Hosea 9:1)
That is not a hellfire and brimstone beating from God because he suspects one of his children is having some fun. That is a holy heimlich maneuver to keep you from choking to death. That is a loving rescue mission to yank you out of the abusive brothel of idolatry. It means your Heavenly Husband is THAT committed to your joy! He commands you to
rejoice not in false-promise, forbidden fruit lies of lust
so that you can rejoice deeply and freely in the sweetness and certainty of his covenant love.
James must have been thinking of Hosea 9 when he wrote chapter 4 verses 1-10 (emphasis added):
What causes quarrels and what causes fights among you? Is it not this, that your passions are at war within you? You desire and do not have, so you murder. You covet and cannot obtain, so you fight and quarrel. You do not have, because you do not ask. You ask and do not receive, because you ask wrongly, to spend it on your passions.
You adulterous people! Do you not know that friendship with the world is enmity with God? Therefore whoever wishes to be a friend of the world makes himself an enemy of God. Or do you suppose it is to no purpose that the Scripture says, "He yearns jealously over the spirit that he has made to dwell in us"?
But he gives more grace. Therefore it says, "God opposes the proud, but gives grace to the humble." Submit yourselves therefore to God. Resist the devil, and he will flee from you. Draw near to God, and he will draw near to you. Cleanse your hands, you sinners, and purify your hearts, you double-minded. Be wretched and mourn and weep. Let your laughter be turned to mourning and your joy to gloom. Humble yourselves before the Lord, and he will exalt you.
You may need to stop rejoicing today. If so, know that God commands it,
FOR YOUR JOY.