I do think state of mind has a lot to do with feeling ugly. There are many people who don't care at all how other people look and people who care a lot how others look usually have some sort of personality defect that doesn't make them great people to know anyways.
Feeling a certain way about your own looks and body can be really difficult but it's important not to project that feeling into others when they probably don't think the same way you do about yourself.