Ben Affleck has had his world turned on its head in the wake of his marital strife with Jennifer Lopez — and a source exclusively tells In Touch he’s being grumpy and alienating friends as a result.

“Ben always has a dark cloud hanging over his head, even when things are going great, but there is no question among the people around him every day that things have gotten particularly dark over the last two months,” says a source who has worked with the Oscar winner, 51, for more than a decade.

In Touch was first to exclusively report last month that he and the “Let’s Get Loud” singer, 54, are “headed for a divorce” and that Ben moved out of their martial home. (Neither have publicly addressed the split rumors, though Ben has been seen without his wedding ring on while J. Lo was thousands of miles away vacationing in Italy.)

In the days since, he has been leaning on ex-wife Jennifer Garner — but the source says he’s pushing others in his inner circle away with his negative attitude. On Sunday, June 23, he was even caught on video scolding members of the paparazzi, calling their actions “dangerous” as they took pictures.

ben affleck, jennifer garner
Bellocqimages/Bauer-Griffin/GC Images

The Good Will Hunting star has been taking his frustrations out “on the people around him,” says the source, adding that “there’s a real danger for Ben when he’s in this state.”

According to the insider, “He could alienate the people who he has been closest with for decades; guys like Matt Damon or his old friend, Yellowstone star Cole Hauser, don’t really want or need to be around Ben when he’s beating himself up like this.”

Getting a smile or a laugh out of Ben “is basically impossible when he’s in this grumpy, irritable mode,” says the source, “and it’s probably not a wise decision that he’s made to just keep working while all these headlines are coming out about his personal life.”

Despite the drama, the actor is keeping himself busy with a return to acting, shooting The Accountant 2 in recent weeks. “You just want to tell the guy to go take a month off and focus on relaxing and recharging, but Ben literally can’t,” says the insider. “He has a studio to run and he’s prepping the next movie he wants to direct and you simply can’t check out of those kinds of commitments because you need some personal time.”

He’s also trying to focus on his family, including children Violet, 18, Fin, 15, and Samuel, 12. “Ben’s kids with Jen Garner need a ton of daily attention and help from him, and he does drop everything he’s doing to make time for them,” explains the insider. “It’s amazing how down Ben is just compared to six months ago, when he was riding high and getting endless praise for his Dunkin’ Super Bowl commercial.”

Adds the source, “But that’s how it always is with Ben: even the biggest victories have a dark side he can’t avoid, no matter how hard he tries!”

Have a tip? Send it to us! Email In Touch at contact@intouchweekly.com.