The problem with self-esteem based on temporary externals is that you only feel good about yourself when things are going well, but when things don’t go so well, you lose your self-esteem.
To prevent this, self-esteem needs to be grounded firmly in self-acceptance. The concept of self-acceptance is based on the knowledge that we are all fallible human beings, we all make mistakes and nobody is perfect. So although you would like to be 100 per cent perfect all the time, the important thing is to learn to accept that sometimes you will be wrong and you are fallible.