When things go wrong how can I respond with righteous anger instead of sinful anger?

In this episode, Dr. Betters answers the question, "I am struggling with anger and I just don’t know what to do. I used to be happy but now even the small things that go wrong set me off. I have been a believer since I was a kid and I know that anger is a sin issue in my heart but I don’t know how to deal with it. I have been reading my bible and in Matthew 5:22 it says “everyone who is angry with his brother will be liable to judgment” and this scares me. When things go wrong how can I respond with righteous anger instead of sinful anger?"