For Marry Me star Jennifer Lopez, playing a famous pop star whose high-profile engagement explodes in a very public way was the toughest role of her career.

No stranger to such a scenario, Lopez’s own engagement to Ben Affleck in 2002 lasted but a year before likewise imploding, having captured the world’s collective heart with their showy “Bennifer” romance.

Lopez went on to marry fellow Latin music sensation Marc Anthony, with whom she shares 13-year-old twins, while Affleck wed another Jennifer – Garner – with whom he has three children.

You’d have to be living under a rock to not know that these sweethearts have since rekindled their romance, reuniting last year just weeks after the end of Lopez’s engagement to US baseball star Alex Rodriguez amid rumours of his cheating.

In a case of art echoing life, the multi-hyphenate actress and singer says of her role as Marry Me’s pop diva, Kat Valdez, “With this, it was about baring my soul in every moment. It was more uncomfortable than playing a character that is nothing like you, because I brought experience into a world in a way that I’ve never had to before.”

Lopez has learned the hard way how to survive in the public eye. “You have to stay focused on who you really are rather than on how the public views you,” she tells STACK as her new film – which showcases all the new songs on her latest album – prepares to launch just in time for Valentine’s Day.

“Kat never forgets that she was a little girl growing up with a dream. It’s the same for me. Remembering where I came from has always kept me grounded. I don’t feel any different, and I think that’s what people forget. That’s why I’ve made songs over the years like Jenny from the Block and Im Real. I’m still the same person, but I’m just doing these things with my life and it has expanded and grown. Still, there’s a human being there.”

If Kat’s humiliation is played out in the unforgiving spotlight of social media, Lopez has been there and done that, so she understands the trope.

“I think there’s a lot of us in each other. This wasn’t a role where I had to research what it was like to be a famous recording artist who does branding and all of this. I understand what all of that is already. I think the difficult part was the meta part – the idea of showing what it’s really like inside my bedroom when something goes wrong and you suffer a heartbreak like this in front of the whole world, and the media kind of goes to town on you,” she says of her Kat Valdez alter-ego who, in an effort to save face, spontaneously marries Owen Wilson’s high school math teacher, Charlie, before a multi-million global audience.

“I wanted to unearth the story and understand it and poke fun at it in that way and what that really feels like. And some of those moments, even with scenes with me and Owen where he’s asking, ‘Don’t you just want to give up on the whole love thing?’ Just that philosophy that she has that I understand. Like no! If there’s a one in a million chance, no matter what the numbers are, then that’s worth it.

“I think what she is craving is that love and that home. So there were a lot of moments where I was able to bring a truth to the character and the emotional life that was really authentic,” she adds.

With some 194 million Instagram followers, Lopez, 52, fully understands the role of social media in projecting a public persona.

“Social media is a very real thing. It used to be just the tabloids or the press and now its social media as well, which can be just as, if not more, anxiety-provoking for people in the public eye. But I think that’s what makes this film also a little bit more modern, in that you have that element of exploring what it’s like to have that heartbreak and huge embarrassment in front of the world and how it travels so quickly.

“Like before, it was, ‘Oh the story’s gonna come out’ or ‘We’ll see if it gets picked up’, but now there’s no doubt. If something happens, somebody’s gonna see it and they’re gonna get it on camera and they’re gonna talk about it. They’re gonna share it.

“And navigating that as a person in the public eye can be tricky, especially when difficult things happen in your life like Kat suffers in the beginning of this movie, which I don’t wish on anybody,” she says, speaking from bitter personal experience.

In Marry Me, Lopez’s character is engaged to Latin sensation “Bastian”, portrayed by 28-year-old Colombian superstar, Maluma (Encanto). But when she discovers, just seconds before her wedding, that he has been unfaithful to her, the façade and the fantasy of her life disintegrates around her.

“In one second, everything changes, and it all falls apart,” she says. “Kat blames herself for not seeing the truth, but also makes a spontaneous choice to marry somebody else in the audience. That’s how she meets Charlie. With that, her life completely changes, as it does when you meet someone who sees you for who you are.”

Buy now at JB Hi-Fi