The federal investigation of President Trump’s personal lawyer, Michael Cohen, is taking a toll on Cohen’s family life, The Post has learned.

Cohen had lunch Wednesday with ad exec-turned-TV personality Donny Deutsch at the swank restaruant inside Barney’s flagship designer-clothing store on the Upper East Side, two days after the FBI raided Cohen’s law office and hotel room.

As Cohen and Deutsch rode down in the elevator following their lunch, The Post heard Deutsch ask Cohen, “How’s your wife?”

“Not good,” Cohen answered. “She didn’t sign up for this.”

The feds were seeking evidence of Cohen’s role in payments that porn star Stormy Daniels and former Playboy model Karen McDougal say kept them from going public before the 2016 election with their claims of having had affairs with Trump in 2006 and 2007.

Neither Cohen nor Deutsch would comment as they left Barney’s, with Deutsch hopping into the rear of a chauffered, black Mercedes-Benz and Cohen walking back to the nearby Loews Regency Hotel, where he’s been staying while his condo in the nearby Trump Park Avenue building gets renovated.

But earlier in the day, Deutsch defended Cohen during an appearance on MSNBC’s “Morning Joe,” according to “The Wrap.”

“When you see him as a character from a distance you say ‘OK, he’s thuggish.’ When you know him, there is something actually very likable about him. Very likable. Very likable about him,” Deutsch said.

“I know this is bizarre to say. He seems like a good guy.”

Co-host Mika Brzezinski — an outspoken Trump critic — also had kind words for the president’s longtime lawyer, who’s often described as Trump’s “pit bull.”

“Very gentle,” she said. “I’ve seen him a couple of times.”

Deutsch later discussed his lunch with Cohen on MSNBC’s “Deadline: White House” program, and said fellow diners were coming up to Cohen and “kissing his ring.”