There are three scales that control pretty much everything in a person's life.
The first is ego and the second is confidence and the third is ability.
Ego is a measure of what you think you deserve. On one end of the scale, you're worthless and should be swept away with the trash. On the other end, you're god himself and should be worshiped by everyone.
Confidence is a measure of what you think you can do. At one end of the scale, you're helpless and hopeless and should live in an institution where people can take care of you. On the other end of the scale, you're superman and can do way more than anyone else on earth.
Ability is the measure of what you really can do. That one's really hard to determine because ego and confidence tends to pull it in opposite directions. You think your ability level is completely different from where other people see your ability level which is completely different from you actual ability level.
Ideally, you'd think these scales should balance each other where what you think you deserve matches what you think you can do and what you actually can do. It's usually not that way though.
These scales can get way out of whack with each other. People with really huge egos can have really low levels of self-confidence. They set themselves up for failure. They think they deserve everything, but their ability is just average so since they don't get what they think they deserve it makes their confidence sink like a rock.
People can get out of whack in the other direction too. Some people have really high confidence levels, but really low ego levels so they never really accomplish as much as they could, because they're convinced they'll never get anything in return.
Sometimes, both a person's ego and confidence levels can be much higher or much lower than their ability levels, so they end up just lost and confused most of the time.
As we get older, these levels do tend to balance out and meet each other, but, boy, does it take a long time and it can be a really painful process.
The best advice here is probably what your parents and teachers and others told you when you were a child. Push your ego down as much as you can. Push you confidence up as much as you can and seek with patience to discover your real ability.