"For he hath made him to be sin for us, who knew no sin; that we might be made the righteousness of God in him." 2 Corinthians 5:21 See my previous posts regarding the Divine Exchange --- Jesus took on our sin and imputed his righteousness to us, so we might stand blameless before God.
We all struggle with our follies and foibles. Sometimes we get angry, sometimes upset, sometimes we get irrationally worried, sometimes we forget to pray and ask God for guidance. Sometimes we fail. Sometimes we sin, other times we say something we don't mean and regret it later. We know that as humans we are all prone to failure. What we do with that failure is what is important. The key is to learn from our failures and mistakes, move on, and try to be more Christ-like every day, to not make the same mistakes we made previously.