OP, I want to share something with you that might give you a slightly different perspective.
Firstly, I have very, very rarely seen anyone who was ugly based on looks alone.
I met a man around 10 years ago and thought he was very handsome. I rarely think that about men tbh! We became good friends and as we knew each other better, he talked about how he felt about himself. His eyes were too close together; his hairline was receeding; he had a bit of a paunch developing etc. Eveytime he criticised himself I looked him and thought, "Oh, yeah, you're right!" None of those things made him unattractive but he only saw himself as a collection of features. I saw him as a whole person and would never have noticed his 'imperfections' if he hadn't drawn attention to them. Yet he felt this things made him ugly.
I'm.a teacher and one year, after making Christmas cards with my class, we left them on the windowsill to dry. The following morning, as the children came in, they went to look at them.
"Look at my star! It's really wonky! That point is too long."
"What? Yours is really good. Look at mine, the points don't meet properly in the middle!"
As each of the childen came in, they harshly criticised their own card for the smallest of details and couldn't see anything wrong with anyone else's. In truth, they were all both equally perfect and imperfect. They were unique just like the children who'd made them.
I used it as a bit fo a teaching opportunity about how we always judge ourselves more harshly than anyone else ever will. The whole is greater than the sum of its parts and all that.
And it's true. Whether it's a 42 year old man focusing on his looks or an 8 year old focusing on their Christmas card!
This is why people make suggestions like getting a good haircut or dressing well or getting your nails done or even smiling because people generally notice the whole and not the parts
In general, when people feel negatively towards themselves based on their looks, they notice the behaviour of others towards them and attribute it to the fact that they're ugly. In reality, it's nearly always down to how people with low self confidence and low self esteem present themselves.
Eg I have had a deep seated belief that I am unlikeable for many years and that that is why I have very few friends. I'm able to make friends easily but unable to sustain them. As I've got older though, I know it isn't that I'm inherently unlikeable. It's far more to do with the fact that I believe I am unlikeable and have had, over the years, a tendency to pull away from people because I dont think they like me anyway. It look me a very long time to realise I'd been doing this though. Nowadays, I still believe that I'm unlikeable but I've decided to let other people come to that conclusion themselves rather than avoiding them. And, guess what? I now have friends.
They way you see yourself impacts on you far more than anything else.