That works for anger, too. It's easy to be angry, isn't it? Especially when we feel wronged, even when our anger is just, righteous. When you hold onto your anger, you are hurting yourself as much or probably more than whoever you are angry with. You live with and feel that anger 24 hours a day; the subject of that anger does not.
I hurt when my loved ones hurt; when my children hurt, I ache even that much deeper, because the ones I love so much are hurting and suffering. I feel angry at the person that hurt them! I'm sad to say that I've wanted to wring a few necks over the years; I never did, but I felt like it. We are God's children; we are His creations. When someone hurts us, He is angry.
When we are angry, give it to God. Let Him deal with it for us. If it's right that we should be angry, He will have more righteous, just anger, than we could ever manage. If we are being angry unjustly, then we need to let it go as well. He will take care of it, either way, whether it's in our hearts, or serving justice.
I do like the book of James:
New Revised Standard Version Catholic Edition (NRSVCE)
19 You must understand this, my beloved:[a] let everyone be quick to listen, slow to speak, slow to anger; 20 for your anger does not produce God’s righteousness. 21 Therefore rid yourselves of all sordidness and rank growth of wickedness, and welcome with meekness the implanted word that has the power to save your souls.