how to gain self love?

CC

Ever since my ex broke up with me I lost weight and hated the way I looked way worse then I did before. I signed up for a weight lifting class at my school... I'm trying to gain confidence back but it's so hard :( how do I stop comparing myself to other girls? Loving myself? Knowing my self worth? I read something that said "you don't have self confidence because you relied on someone to build it on you, now that he is gone the confidence is gone" how do I gain confidence in MYSELF not what others tell me?