You can lose all of your excess weight & be as slim as you would like to be, but you are still the same person, with the same doubts, faults, hangups etc. If you lack self-esteem when you are over-weight, it usually doesn't just disappear when you get to your goal weight.
I lost 36 kg in 6 months, but still felt the same about myself. I saw a Psychologist a few times & she really helped me to build up my self-esteem. You really need to work at it constantly. A lifetime of being self-critical will not change overnight. I'm really glad I got help.