I have to write today and trust that the process of getting these thoughts off my chest will prove therapeutic.
It is very upsetting when you beat yourself down, feel inferior and insecure, because other people don't like you, or don't treat you in the way you think is worthy of fair exchange. We start hating our-little-selves when other people - that we really like - treat us differently from how we hoped they would. If you try and impress someone that you love, and go out of your way, it often ends badly since you have an expectation to receive the same treatment.
Now, firstly, you should never expect anyone to give you exactly what you give them. Secondly, if you have an imbalanced relationship, then don't bend over backwards and expect to get the same in return. Accept that you are a good person, with great attributes, and that someone will come along and appreciate you for the person you are. Just like you should feel about people you like. It's not worth the feelings of insecurity, or depression, when people don't really appreciate you. If they don't see the good things you do for them, then it shouldn't make you feel terrible about yourself, rather make peace with the fact that you've done everything you could to be a great friend/person, and stop beating yourself down. We need to love people for who they are, and never expect anything in return. This selfless attitude needs plenty discipline, but it's honestly the most rewarding and successful approach in life. Love, and you will be loved.
PS: I can't help but to post this image again of me and our family dog Simba. Dogs don't hold regrets and it doesn't matter how crazy-mad you get at them, they will still love you and protect you regardless. Always. Unconditional love. We can learn from them!