I struggle with this issue myself. I used to actively practice self compassion daily. Here's a good webpage that I use
Self-Compassion Exercises by Dr. Kristin Neff She also wrote a book called Self Compassion. I think this relates to confidence because its about feeling good about yourself and not beating yourself up when things go wrong. It's hard and I'm still getting there myself. I can tell you that when I practice self compassion, I usually get out a piece of paper, or my journal, and think about something bothering me. I sometimes write that down, but usually I write to myself as I would talk to a dear friend or a child I care about. I say supportive things. It helps.