In an interview with Harper's Bazaar, the "Second Act" star spoke about fame, motherhood and self-love. Lopez, who has dated stars including Ben Affleck, Marc Anthony and Sean "Diddy" Combs, explained that all of her relationships up to this point ended because she hadn't figured out herself yet.
"For me, the relationship journey has been very up and down," she said. "But it didn't have to do with anybody else but me -- it was about me figuring out me."
"Until you learn to love yourself, you can't completely love [someone else] in a way that is pure and true," she continued. "Once you do that, you can have relationships that are based on love and respect, that are supportive and nourishing. There's an evolution there that had to happen for me. I feel like I'm in a better place now."
"I've got two amazing kids and a great boyfriend," she added. "I don't have everything figured out, and everything isn't perfect. But I feel very proud that with all the things I've gone through in my personal life, I'm still optimistic and hopeful."
Lopez said she credits motherhood for her personal growth because it caused her to reexamine her own life. The "Dinero" singer shares 10-year-old twins, Maximilian and Emme, with ex-husband Anthony.
Camilla Akrans/Harper's Bazaar
"Once I had kids, I realized that I had to be better and do better," she said. "Not just for them but for myself. There's something about being responsible for another human being that makes you go, 'Okay, what am I doing for myself? How can I take care of someone else if I can't even take care of myself?'"
"'How can I teach them how they should be treated if I allow people to treat me in a way that's not nice?'" she added. "'How can I teach them to be hard workers if I'm not working hard?' I started examining myself from all different angles."
The singer expressed that she feels "very proud" to have "survived" 30 years in this business. Because of this, Lopez said she's trying to give herself "more credit" for her huge successes.
"It's hard when people are always telling you that you're not good at things or saying, 'Why is she successful?'" she said. "You get a lot of that when you're a successful woman. You don't get that as much when you're a man."
She added, "The thing about people, women especially, is that you can have 12 people telling you you're amazing, but that one person kind of putting you down, that's the voice that sticks in your head."
The February issue of "Harper's Bazaar" hits newsstands Jan. 22.