M.H.
I have a 7 year old daughter. They are at the age where they are starting to compare themselves to others. Her self esteem may not have anything to do with her parents at all. It may have been something happening at school. Maybe someone at school said something to her to make her see herself as ugly. Maybe there's a girl in her class that others describe as pretty who may be more of a tomboy which is why she now wants to be a tomboy.
I always encourage my daughter and try to build her self-esteem and at times it seems like nothing I can say helps or changes her mind. Have you asked her why she thinks shes ugly or if someone called her ugly? She may not want to talk about it. I would keep trying. Ask her if there is an outfit she feels pretty in.
Unfortunately kids now are exposed to the medias standards of pretty which aren't realistic or even true in some cases with all the photoshop tools we have now. Just be there for her, get her to talk and engage her in activities she's good at to help boost her self esteem.