I'm 17, not particularly attractive due to my height and just general appearance and I cope by changing my way of thinking. A few months ago I was in a similar situation to you; I'd get really depressed about never being able to find a girlfriend and such. I started talking to a girl who I became friends with and she didn't care about what anyone thought about her. Throughout out friendship she'd always poke fun at my deep insecurities and I had enough, so I just left her a message saying I didn't want to be friends and she replied "ok I don't care". I got really mad for about an hour or two, we were friends for half a year and she didn't even care that she'd never talk to me again, I felt as though she needed to care about what I thought. The lesson I learnt from this is not that you should not become friends with anyone, but that I shouldn't get mad at what people think, whether it be that they don't care that I'm not their friend anymore or that I'm ugly etc.
Some other things I did was to stop using facebook etc because a lot of the negativity about my appearance was coming from there (seeing people make constant jokes about height, girls saying they'd never date anyone below 6ft etc). By doing stuff like that, I removed a lot of sources of negativity from my life.
After that, I had a long thought about what I wanted to do in life, not necessarily in the long term such as becoming a lawyer, just things that I wanted to do like building a shelter in the forest where I could sleep if I wanted, to learn to live in the wilderness, to learn how to speak Russian or to get into a good university (I'm in year 13).
Alongside those things I also started eating healthily, cycling for at least half an hour each day, going to the gym, learning how to be fashionable and to get a good haircut and glasses so I look better than before. I've also tried to become more confident; instead of being the shy kid who never says anything, I'll try to take a leading role in things such as stuff in school or to be more active such as volunteering in a museum. Your confidence can't be faked, it has to be derived from experiences and your abilities (if that makes sense).
TLDR: Basically, I learnt not to care about how people feel about me (if they're not important to me, such as random people at school), I blocked out most of the negative things in my life, found ways to be happy by thinking about my interests and how I can do those more often, so that my happiness doesn't depend on whether I have a gf or not, but instead it depends on what I can do by myself/with my friends, and then I improved what I could about myself by being proactive.
I hope this helps a bit, I don't really know if I've missed anything out but I think I've got my main message across.