Anger at sin is ok as long as it is controlled by the Holy Spirit. We are told to hate the sin but to love the sinner. I think that also works for us - my problem is that when I sin, I get so angry with myself - not that I am perfect but I get really down on myself. I need to remember that God loves me and has died on the cross for that sin.