Ben Affleck's childish behavior played a major role in his divorce from Jennifer Lopez

The extreme and sudden mood swings of the 52-year-old actor Ben Affleck have finally driven a wedge in his relationship with Jennifer Lopez.

"The truth is there was a lot of love, but unfortunately Ben's erratic mood swings, which he couldn't hide from the press no matter how hard he tried, also became clear," a source close to the former star couple told People.

"You could see his erratic behavior, the giant mood swings," he explained, describing how the actor went from "an incredibly happy and warm person in his best light, to the deepest, darkest demeanor.

Lopez, 55, listed the couple's separation date as April 26 in their Aug. 20 divorce filing -- the couple had tried to make their marriage work, but Affleck's volatile moods made things difficult.

“They were trying to work through it, but the mood swings and big ups and downs brought the toxicity to the fore. In that case, no one can help you - you have to help yourself," the source added. I BGNES