Sit in your bedroom for two months, stare at yourself in the mirror, and say aloud, "I am very good looking, people like me." At the end of those two months, you'll have sunken eyes, and be more skinny fat than when you started.
Confidence is developed because of actions, not because of words. A true belief in yourself is developed due to internal and external validations that occur again and again. There are one offs who, since birth, have had irrational confidence in themselves. More so, this irrational confidence really brings these people the ability to lift themselves up by their boot straps, and know that they will eventually prosper at the something they're after. These irrationally confident people still know of the hard road ahead of them. The only difference between them and your average Joe is that they have decided they will never give up. That they will get what they're after, no matter the cost.
Here is the shitty truth; in order to become confident about something, you must prove to yourself that you are great at that thing. However, if you want to become great at that thing, you must do it over and over again. And, if not the first day, before long, you will fail. No one likes failure. Many failures can hurt your ego and your self-esteem. Years and years or even months and months of this punishment can really put people in a bad way. And, here we reach the tipping point for most. They will begin rationalizing whether or not it is worth it, and decide whether or not they should abandon their goal. The comfortable will almost always abandon their goal because, why bother... they don't really need to do that, they have X, Y, and Z anyway?
This is why you will easily develop confidence in the things that you are most passionate about. But, if you're not naturally passionate about it, you must sell your soul in order to prosper and gain an unwavering confidence. Whatever it is must own you for a least a period of time. It must consume you and make your knuckles white. Or, you must box yourself in and force yourself to become passionate about it. You must remove the comfort, in order to create a desire.
However, there are some things you can do to make you more confident in starting something at all. At it's root, confidence is really a convergence of life experiences. Confidence for all those things you have sold your soul to, and the confidence developed from your passions, all begin to compound to create a smoother journey for those things you lack confidence in. In this way, your ego takes over, and helps you to power through situation you're less confident about. "I can talk to her without being nervous, I am the guy who came from nothing, look what I made myself into." Or, "I can talk in front of all these people, I was able to overcome X, Y, and Z. What I went through was hard, and look at what I can do."
However, what is still missing is the succession of the task, and succession over and over again. You must have a track record in the particular task in order to feel an unwavering confidence. Whatever it is you want to be confident about, you must practice it until you're blue in the face. You must understand that pain is a normal part of this journey, and so is failure. When you reach a state of confidence, nothing feels better, or makes you feel more alive.