Couple comments:
I see this so frequently in young women when I give them a compliment. instead of simply saying, "Thank you" they go into excuses about why I'm not seeing them accurately. "No, my skin isn't really that nice. I just have a lot of make up on, etc."
There it is - one of the ways we can make ourselves feel less than how someone else sees us.
Even if you suspect that the compliment is not sincere go ahead and accept it. Everyone needs affirmation and it's free.
The other thing is that you don't need anyone in your life to berate you to make yourself feel badly about yourself. We go through life picking up those little bumps and bruises. A lot of them come from the people who raised us. As little people it's very easy to misinterpret the reason for the mistakes they make in calling out our flaws. We can internalize those messages intended to guide us and turn them into the message that I'm not okay.
We don't even know we're doing that but once the message is internalized it will repeat itself to us whenever we think, sometimes erroneously, that we have done something wrong.
So it's very important to learn to recognize your self-talk. That's what you say to yourself. It's a dialogue most of us have going on in our head. Some of it is other peoples' opinions and other of it is lies. Also there is our true and healthy voice which observes and encourages. It's all got to be sorted out and the counterproductive, negative stuff discarded or it will keep you stuck in negativity.
I didn't learn about this until I was well past high school and I remember when I first recognized that critical, mean voice beating me up for a mistake. I had put a belt on and was running late but just before I went out the door I discovered that I'd missed a belt loop. I heard the voice, think I nearly said it aloud, "You stupid, b---h, now you're going to be late."
I don't think during my raising anyone had ever criticized me that harshly. Yet here I was calling myself names for making a mistake. What a revelation!
Since then I've learned to carefully monitor my self-talk and provide positive and forgiving messages to myself. "That's a mistake everyone makes some time. When you get there you can step into the washroom and fix it."
One more thought. Know your values system and don't violate it. If you know that eating that second bowl of ice cream, lying to a friend, stealing that $5.00 is going to make you feel badly about yourself don't do it. Know what things will decrease your self-esteem and avoid them like the plague. The price of self-esteem is integrity.