Answer
Psalm 4 is a psalm of trust written by David. The psalm is brief, only eight verses (nine, including the Hebrew ascription “for the choir director, on stringed instruments, a Psalm of David”). The psalm is written in three sections with a “selah” (a marker for a pause or musical interlude) at the end of verses 2 and 4. In the second short section, David sings, “Tremble and do not sin” (Psalm 4:4, NASB) or, as the ESV puts it, “Be angry and do not sin.” The Hebrew word translated in the ESV as “be angry” is ragaz, and it can mean “to be disturbed or agitated.” David recognizes there are legitimate causes to be agitated but cautions against going so far as to be sinful. In the New Testament, Paul quotes from Psalm 4:4 while giving instructions on Christian living in Ephesians 4:26.
David calls out for God to hear him as God has done before (Psalm 4:1). David seems to be concerned about men who are mistreating him in falsehood (Psalm 4:2). David affirms his confidence in God as having set apart the godly person and hearing him when he calls out to Him (Psalm 4:3). So, one can be bothered—or even angry—and yet, because the godly person knows that God hears and delivers, that anger should not extend to sinfulness (Psalm 4:4). In the same way, David calls to the hearer to meditate (on God’s faithfulness) quietly in the night and to be still (Psalm 4:5).
In the final and longest section of the psalm, after reminding the hearer to “be angry and do not sin,” David exhorts that we should “offer right sacrifices, and put [our] trust in the LORD” (Psalm 4:5, ESV). Because of that trust in the Lord, the godly person never needs to fret about wrongdoers. Even when others are not showing us good, God shines His light on us (Psalm 4:6). He is the one who puts gladness in our hearts even more than having plenty (Psalm 4:7). We rest peacefully in the night because of Him (Psalm 4:8).
This psalm is, among other things, a helpful reminder that we can “be angry and do not sin.” We may be upset, but we do not need to be overcome with anger, because we trust in Him. Paul later quotes Psalm 4:4 (translating the Hebrew ragaz with the Greek orgizo, indicating that the term angry is an accurate rendering), reminding believers that anger is acceptable if it does not extend to sin. Paul also puts an important time limit on anger, as he says, “Do not let the sun go down on your anger” (Ephesians 4:26, ESV). David’s song was seemingly to be sung at night, as it focused on God’s provision good rest because of our trust in the Lord, and Paul challenges his readers not to take anger to bed with them. While David’s words appeal to the heart, Paul’s are more an appeal to the intellect, but they are providing the same prescription: don’t end your day overcome with anger, but rather have confidence in the Lord.
Anger and faith are mutually exclusive ideas, as the anger of man does not achieve the righteousness of God (James 1:20). God is trustworthy, and anything that might bother us to the point of anger can be given to Him. We can trust Him to handle it.