An insecure Fergie  tones up in hopes of shoring up her shaky marriage!

Still devastated from hubby Josh Duhamel’s cheating, the Black Eyed Peas singer – who gained nearly 20 pounds for the musical Nine – has started a new diet and exercise regimen.

"Fergie’s self-esteem took a huge hit after finding out Josh cheated. But she’s fighting back by getting in the best shape of her life," an insider told The ENQUIRER.

Fergie told a friend: "A killer body is the best revenge."

In a blockbuster world exclusive, Georgia stripper Nicole Forrester told The ENQUIRER that she had a marathon sex session with Transformers hunk Josh, 37, while he filmed in Atlanta this past fall.

The ENQUIRER later  reported 34-year-old Fergie told friends that she agreed to forgive Josh because they still love each other and want  a baby.

Now Fergie  – a longtime yoga and treadmill devotee – is working hard to keep off the 17 pounds she put on to play a curvy Italian hooker in Nine, according to insiders.

She’s taken up Piloxing – a combination of Pilates and boxing – and ordering from a food delivery service called Diet Designs, said the insider.

"Fergie is determined to make herself look great for Josh. She even said she’d consider cosmetic procedures," the insider divulged.

"She thinks Josh is a very good man, for the most part, and is worth all the effort."