Long before self-care was a household term, Jennifer Lopez was singing about it. Back in 2000, she sang in “Feelin’ So Good”: “I’m feeling so good/ I knew that I would/ Been taking care of myself like I should/ ‘Cause I don’t think anyone can bring me down/ Nothing in this world’s gon’ turn me around.” But while it may sound like Lopez’s positive relationship with herself was a given, it actually wasn’t an easy journey for her.

The pop star recently opened up about her path towards loving herself, which really took off after she exited her marriage to Marc Anthony in 2014. “I knew there was something going on that I did not understand,” she told People, adding that their divorce was the moment when she really took a microscope to her relationships with herself and with men. “I was done blaming other people — he did this or he did that — and I said to myself, no, it’s you.

In the aftermath of her divorce, Lopez says she started to relearn who she is, with help from a therapist. “I grew up sharing a bed with my sisters from the time I was born, [and then] it was one boyfriend, and then another, and then a husband, and [so on], and I realized you’ve never been alone,” she said. “Until I could really learn to be happy on my own and love myself, these relationships were never going to work out, no matter what. That was a big turning point for me.”

Another turning point? Becoming a mom to 10-year-old twins Emme Maribel Muñiz and Maximilian David Muñiz. “Love was supposed to feel a certain way — just natural [with] a very selfless, unconditional pure quality,” she said of how her definition of the word changed as she raised them.

Only after she learned that was she able to enter into another relationship, this time with former baseball player Alex Rodriguez. “It wasn’t until I met Alex that I felt like, ‘Okay, I can be in a relationship again,’” she said. “Everything feels healthy and different…We bring something to each other’s lives that is profound, good and healthy.”

That empathy for one another that Lopez is talking about is central to being in a successful relationship, as is compassion. “It is a hundred percent inevitable that love will stir our deepest longings and our oldest wounds,” Alexandra Solomon, Ph.D., a licensed clinical psychologist, clinical assistant professor at The Family Institute at Northwestern University, and author of Loving Bravely: 20 Lessons of Self-Discovery to Help You Get the Love You Want explains to Thrive. “We need what I call ‘relational self-awareness’ in order to work compassionately and curiously with all of what love awakens in us — the beautiful and the messy.”

A positive relationship with yourself, then, should be the basis of any relationship with someone else. “We have to have a good relationship with ourselves to be brave enough to be that vulnerable,” Solomon explains. “Our vulnerability invites our partner’s compassion,” she says. “All day long there is a conversation going on inside of your head. If that voice is self-critical (don’t be stupid! You’re weak! Don’t eat that!), you are much more likely to treat your partner with the same harshness, be incredibly sensitive to perceiving your partner as critical of you, or both. Self-compassion is the precursor for intimacy.” Take it from Lopez and Rodriguez.

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here.