I don't really know much, but these are just my ideas...
Self-esteem is made up of comparisons. We compare our real self to our ideal self. We compare ourselves against others. And people we meet compare us to others also. If we compare well, we feel good, and if we compare badly, we feel bad.
We accept these comparisons as if they were facts, but really they are all just opinions, which are based on a set of values, normally imposed on us by society. But If I were to base my own self-esteem on those values and opinions, I would feel very disappointed in myself.
I can't directly control how other people feel about me, but I can alter it to some extent by changing how I feel about myself. To change how I feel about myself, I need to redefine the rules I use to do that. There's nothing to say I can't. It's my life, and I can judge myself how I want to, not how someone else says. When I play by the usual rules, I come out bad. So why not play to a different set of rules? Nothing is stopping me! (I'm not sure, but I think CBT is roughly based on this idea...)
I can define what's important. What is my ideal self? Is my ideal something I've defined, or is it something that someone else has defined for me? Is it based on my personal values, or someone else's ideas of achievement? If so, I can take that control back, and make my own rules. How do I compare myself to others? Is it on my terms, or on theirs?
Also, you mentioned how you feel like you are getting things wrong. But getting it wrong is absolutely fine. Making mistakes is part of the natural process of learning, so in one sense the only true mistake is to give up trying. Everyone gets it wrong all the time. I've got it wrong all of my life, but as a very wise man once said, "failure is the pillar of success".
I don't know if what I said was any use, but I hope you won't be too hard on yourself. I don't know you personally, but every human being is full of amazing potential and ability... often the only thing holding us back is our own doubts about ourselves.
Take care, and hope things get better for you 
Last edited by robinhood on 20 Jan 2010, 8:15 am, edited 6 times in total.