I'm not sure if it'll be helpful or not as I still feel like an imposter and get nervous in some situations but most people around me would describe me as "confident", my partner laughs when I say something such as "I'm not confident" / "get nervous" etc, and in myself I've certainly felt more confident over the years (I used to be a wreck at times!).
For me it's about realising "what matters"?
Does it matter if you "lose at something"? No, especially if just a game.
Does it matter if you lose at a debate? No, as you can never lose: if you're point if proven that's great, if you realise you were wrong then that's great, and now you've learnt something.
Does it matter if someone doesn't "like you"? No, many others will and they're reason for not liking you is likely flawed
Does it matter if you make a mistake? No, as hey it's just a mistake, everyone makes them and it says nothing about you as a person.
Does it matter if you slip / trip / snort when laughing? No, doesn't say anything about you as a person.
Does it matter if you're opinion isn't a popular opinion: no, it's just an opinion, but I get that it can at times takes bravery to go against the crowd.
If something ever starts to play over in my mind, I somethings think: Will this matter in 10 years? Will anyone even have remembered this in 10 years? Chances are not.
And where you've genuinely done something to be ashamed of (not stood up for what was right, not lived in accordance with your values, snapped when you shouldn't have etc etc), it's unlikely to matter as those around you that love you will understand and forgive (as everyone, at sometime in their life, makes mistakes - it's not the end of the world). Those that don't understand or won't forgive, it's just a sign their values aren't what they should be so it doesn't matter what they think.
If there's some activity or circumstance that you often lack confidence in (for me this was presenting, and I am in a profession where I often end up having to speak to 400+ live and / or am asked to make a speech at an awards ceremony etc), find crutches that get you through it, and just push yourself to do it over and over again knowing that like anything in life, the more you do it the easier it gets. I used to for example get incredibly sweaty (!), tongue tied, my vocabulary would shrink to 3 words but I learnt that if I just make a few bullets, go with the flow, be myself, it'll all be fine and hey, who cares if I don't choose the optimum words - at least I tried.
Which is almost a Segway into the final point of just be yourself safe in the knowledge that all anyone can everyone ask of anyone in life is that that person is trying to be their best self and will make mistakes along the way, come up short at times and that's all part of life - those that matter, will understand and for them it won't matter - they'll be cheering you on!
Hope this helps and if not, hey, I won't get upset about it :)