This is something that a lot of people struggle with. You might have heard it all before, but beauty is in the eye of the beholder. It may seem a hackneyed phrase, but truly, what's on the inside reigns far superior to what's on the outside. No, not to everyone it doesn't, but to those people that matter, it does.
The reason people treat others so shallowly is because society is corrupt. When society looks at someone, they see them as one judging a book by it's cover. When you know deep down you are so much more than that.
It all starts with learning to love yourself for who you are. To realize that you were wonderfully made. When you look in the mirror, focus on what you like about yourself and go from there. It's a process, and there are going to be days when you just feel awful, and there will be others when you really feel you're making progress.
I wish you the best of luck and hope that with every passing day, you'll see that you are truly someone wonderful.
Take care & God bless