08/02/2011 at 09:20 AM EDT
Her self-respect and the need to be treated properly contributed to Jennifer Lopez
's decision to end her seven-year marriage
to Marc Anthony
, PEOPLE's Most Beautiful Person 2011
says in her first interview since the couple announced their separation
"It’s not that I didn't love myself before," Lopez, 42, tells Vanity Fair
in its September issue. "Sometimes we don't realize that we are compromising ourselves. To understand that a person is not good for you, or that that person is not treating you in the right way, or that he is not doing the right thing for himself – if I stay, then I am not doing the right thing for me."
She adds, "I love myself enough to walk away from that now."
Lopez says both she and Anthony worked at making their marriage work. "Sometimes it doesn’t work – and that's sad. But I remain an eternal optimist about love. I believe in love."
Saying that she knows her own strengths, Lopez now welcomes the challenges ahead and looks forward to being the best "mother, entertainer and person" she can be. Lopez is the mother of 3-year-old twins
, Max and Emme.
As for her ex, "I will always respect Marc as a singer and performer," she says, citing how especially well they work together. "He will always be in our lives. He will always hold a special place in my heart as the father of my children."