Confession is possible because of the Gospel: God saves sinners not perfect people. " But God demonstrates his own love for us in this: While we were still sinners, Christ died for us." We can admit to our failure because we stand not on our own righteousness but on Christ's.
In it we can find acceptance just as we are and hope for change in the future: "he who began a good work in you will carry it on to completion"
Directed self talk can be very helpful. You arr the person you listen to most in life and what you tell yourself can radically alter your perceptions.
That said, self talk is very hard. We are easily deceived, and you can get trapped in your own thoughts: anxiety, depression, neurosis.
We're not meant to go it alone. Seek help. "Therefore, confess your sins to one another and pray for one another, that you may be healed."