26 “In your anger do not sin”[a]: Do not let the sun go down while you are still angry, 27 and do not give the devil a foothold.
Literally, it’s “Be angry,” but the NIV probably captures the meaning well, since it likely is not an actual command to be angry, but rather an accommodation. In fact it is not saying that anger in itself is sin, but suggesting that it can lead to, or become sin.
Ephesians quotes from Psalm 4 (see other translations from the link below, and notice the context):
4 Don’t sin by letting anger control you.
Think about it overnight and remain silent. Interlude
It might be okay to be angry. Anger is dangerous, and best avoided. But sometimes anger is not only acceptable and justified, but it might even be right. Of course the Lord’s anger is always right, what is called righteous anger. And given the evil in the world, it can surely sometimes be quite wrong not to be angry.
But justifiable anger needs to be given over to the Lord in prayer. We most likely will have to confess what is sin in our anger to God. We have to let it go, or at least give it to God as best we can. And we have to counter it with mercy extended to the one who might be in the wrong. Or dealing with the issue of just why we’re angry. Of course the Psalm 4 passage is good on this. Silence is most often wise, especially in the face of what is angering us, or most likely to. We dare not forget the deadly demonic force the tongue can be (James 3).
Anger and grace don’t mix. Do we want to endeavor to walk with God, and hear from God through his word? Then we dare not harbor anger. That opens the door to the devil, and to all the deception that comes with that. It is more than not worth it. It is bad in and of itself.
So no matter what the case, let’s deal with what is provoking or troubling us as best we can: in prayer, silence, pondering, more prayer, and definitely as well endeavoring to listen to God through God’s word. In and through Jesus.