Stop judging yourself by what happens to your in life, so you're not basing your confidence on outside events.
Forgive yourself and others for past mistakes. Harbouring old grudges takes up a lot of time and energy which you could be using in more productive ways.
Learn to think differently. When you fall into self-criticism, notice them and change them to positive thoughts.
Set goals/outcomes on the basis of what you can realistically achieve, and then work step-by-step to develop your potential. Acknowledge small achievements which take you closer to your end outcome.
Emphasise your strengths. Focus on what you can do rather than what you cannot.
Remember self-confidence and self-esteem are learnt behaviour, and with practice can be built.