Amid her divorce from Ben Affleck, Jennifer Lopez admitted that she never expected to go through everything she experienced this summer.

“I was thinking about this time in my life, and I’m like, ‘That’s not what I thought it was going to turn out like,’” the singer said in a chat with Nikki Glaser for Interview Magazine on Wednesday, October 9. “And then I thought, ‘No, this is exactly where I needed to be, to lead me to where I want to go.'”

Nikki, 40, chimed in to say, “The pain you just went through, you do not regret.”

“Not one second. That doesn’t mean it didn’t almost take me out for good. It almost did,” Jennifer, 55, replied. “But now, on the other side of it, I think to myself, ‘F–k, that is exactly what I needed. Thank you, god. I’m sorry it took me so long. I’m sorry that you had to do this to me so many times. I should have learned it two or three times ago. I get it. You had to hit me really hard over the head with a f–king sledgehammer. You dropped the house on me. Don’t have to do it again.’”

The Hustlers actress filed for divorce from Ben, 52, on August 20 after two years of marriage. She listed their date of separation as April 26.

Speculation about their relationship swirled in the months leading up to their split as the pair put their marital home on the market and were spotted spending time on separate coasts. Ben purchased a home without Jennifer in Los Angeles in July.

Jennifer shares kids Emme and Max with ex-husband Marc Anthony, while Ben shares kids Violet, Fin and Samuel with ex-wife Jennifer Garner.

Jennifer Lopez Says She Is 'Free' Amid Ongoing Ben Affleck Divorce
Steve Granitz/FilmMagic

During the interview, J. Lo admitted she doesn’t have “everything figured out” but is looking forward to the future.

“Now I’m excited, when you say you’re just going to be on your own,” she said. “Yes, I’m not looking for anybody, because everything that I’ve done over the past 25, 30 years, being in these different challenging situations, what can I fucking do when it’s just me flying on my own.”

“What if I’m just free?” Jennifer asked.

“The work is figuring yourself out. It’s looking back at the feelings underneath and the belief systems that we have about ourselves that make us make certain choices and create certain patterns in our life,” she said. “And so, when you get to a point where you think that you’ve learned the lessons, and then it blows up in your face again, you realize, ‘OK, I haven’t, so what is it that I need to look at right now?’ I would say, never stop looking inward, because it’s so easy to blame everybody else.”

The Grammy winner most recently appeared in the film Unstoppable, in which Ben and his pal Matt Damon produced. She attended the Toronto International Film Festival premiere of the movie solo in early September, as Ben was spotted out spending time with his kids in Los Angeles.