Jennifer Lopez is happy and secure these days with her new love Ben Affleck — but it wasn’t too long ago that the diva came dangerously near to having a nervous breakdown!

“Jen was falling apart,” a source close to the star told The ENQUIRER.

“She was racked with anxiety and very depressed. She lost 10 pounds.”

The 32-year-old superstar has confessed that in the spring of 2001, she suffered from crying jags and anxiety attacks so severe she had to cancel a press junket for her movie “The Wedding Planner” and put herself through a battery of medical tests.

She blamed the stress of juggling her career and personal life for the near-collapse.

“I was exhausted, emotionally tired, anxiety-ridden,” Jennifer told an interviewer.

But although Jennifer felt the pressures mounting in her life, she seemed unable to do anything about it, the source said.

“She wouldn’t work out, which would probably have helped her,” the source revealed. “Her hair was tied up all the time; she had no energy to fix it up. She wore the same kind of outfit every day — her favorite sweat pants.

“She sought help from a psychologist and it was suggested she take antidepressants, but she said medication takes six weeks to take full effect and she couldn’t wait.

“Jen had zero patience for people,” the source said. “She’d fly off the handle and scream about things. She was overworked, overbooked, and overextended.”

Stresses on the star had begun mounting months before her emotional crisis, with rumors that there was a secret tape of Jennifer making love to her then-boyfriend Puffy Combs, and that Combs’ rival Suge Knight was going to release it to the press.

“The mere thought of it upset Jen greatly,” the source said. “Jen couldn’t cope, she was scared. It was about this time that Cris Judd became part of her life.”

Cris’ calming influence helped the singer win back her composure, and eventually what started out as support and kindness turned to love. When Combs was acquitted after his trial for a shooting incident, Jennifer’s romance with Cris went public.

But even with a new love, the stresses on Jennifer continued. During the 2001 filming of her movie “Enough” she began to buckle under the strain.

In the movie, Jennifer plays a battered wife dealing with an abusive husband. The star trained hard to get in shape — and tried to think like her frightened character.

Soon she was feeling so crazy she sought medical attention, demanding an EKG and a CAT scan.

With her doctors’ help, Jennifer eventually bounced back — but friends fear she’s still got too much on her plate.

After breaking up with Cris in July 2002, she’s found love again with Ben Affleck, finished up a new video, and wrapped her movie “Jersey Girl.” Her new movie “Maid in Manhattan” is due for release and she’ll begin a concert tour in April. She’s relaunching her clothing line, promoting her fragrance “Glow” — and next year, sources say, she plans to wed Ben.