In psychology there’s a term called cognitive distortion. A cognitive distortion is basically a unhealthy thought pattern that negatively affects your emotions and behavior. Sometimes we have these distortions for so long that they become the automatic thoughts.
One common distortion is black and white thinking. With this kind of thinking everything is good or bad. You’re either successful or a failure. There’s no in between. Another distortion is over generalization. For example “I didn’t get the job I wanted, so no job will want me”. Or “My relationship failed, so every other relationship will probably fail”.
When the negative thoughts become automatic, they can be an immediate confidence killer. There’s no room for doubt, because they’re the first thoughts that come to your head. It’s similar to the way that you recall facts. In your mind these thoughts become facts.
We all know that people who are beautiful and intelligent, who strongly believe they’re ugly out of shape and dumb. Your opinion about yourself is the one that holds the most weight. If your thoughts about yourself are false and harmful, no amount of compliments will make you confident. Confidence starts within you.
When you replace the negative thoughts with positive ones, eventually the positive thoughts will become automatic.
If fear or low-self esteem is holding you back from the things you want in life, I advise you to read more about cognitive distortions. Personally it really helped me to change my way of thinking.