When Eilene Zimmerman was at her former husband Peter’s funeral in July 2015, she glanced at his co-workers from a top Silicon Valley-based law firm.

A small group sat low in their seats, heads bent over, as if overcome with grief.

Then she realized the truth: They were looking down at their phones.

“Some were texting,” Eilene told The Post. “And I thought: ‘Peter died at 51 from working too much, and you can’t stop working long enough to listen to what is being said about him?’”

The Harlem resident writes about Peter’s untimely death — and his shocking addictions, to both work and drugs — in her memoir “Smacked: A Story of White Collar Ambition, Addiction and Tragedy” (Random House), out Tuesday.

She describes how the high-flying patent lawyer felt the only way he could keep up with his $1.4 million-a-year job was by secretly using cocaine, opioids, Adderall and crystal meth. In the end, it killed him: Peter died from a heart infection brought on by his dependence on narcotics.

“Drug abuse is endemic in the upper echelons of corporate America,” said Eilene, now 56.

“Drug abuse is endemic in the upper echelons of corporate America”

 – Eilene Zimmerman

Peter had been a laid-back man when the couple first met in April 1987 in Manhattan. But after they married and moved to San Diego, he was walloped by his new job: As a law associate, he worked brutal hours and felt the need to meet clients’ demands at all hours.

Eilene, a freelance journalist, recalled how, right before their daughter Anna’s first birthday, her husband just didn’t come home one night. The next day, he told her that he’d been working.

“When I said: ‘This isn’t the law school library, we have a life and a daughter!’ he looked at me like I was an idiot,” Eilene recalled. “The message was clear: ‘This is how it’s going to be.’”

Things didn’t ease up after the birth of their son, Evan, in 1998. And the workload only increased once Peter eventually made partner.

“I would beg him to spend more time with the children, but he was always working, even over weekends,” she said. “He kept saying, ‘One of us has to pay the mortgage.’”

Peter’s obsessions with work inevitably wrecked the pair’s marriage, which ended in 2009 after Eilene discovered he was having an affair. Still, the exes stayed close for the sake of their kids.

“We were determined to be really good co-parents even though we lived apart,” said Eilene.

As a bachelor, Peter took up marathon training and dropped 25 pounds from his 6-foot-tall, 190-pound frame. But it didn’t stop there. In the fall of 2014, a friend told Eilene: “Peter looks like he’s got cancer or AIDS.” His cheeks were becoming hollow, his eyes and teeth yellow and collared shirts just hung around his neck.

Eilene was relieved when Peter disclosed he’d been diagnosed with the treatable thyroid condition Hashimoto’s disease.

Eilene and her husband Peter, in New Hampshire, during his third year of law school.
Eilene and her husband Peter, in New Hampshire, during his third year of law school.

But Hashimoto’s could not be blamed for his erratic behavior (and, in fact, Eilene believes he didn’t have it).

Evan would frequently spend hours waiting for his dad to pick him up from high school once a week, with Peter blaming everything from a lost wallet to a flat tire for his lateness. At his home, Peter would hide out in his bedroom, leaving the teenager hungry and alone. Around 9 p.m., he would emerge and say he was headed to the gas station to buy a soda.

“The gas station was only a mile away, but he wouldn’t return for three hours,” said Eilene.

Matters came to a head in the summer of 2015 when the kids were staying overnight with their dad and he began vomiting thick, black bile.

“Evan tried to persuade him to go to the ER,” said Eilene. “Peter never yelled at the children, but he shouted, ‘Leave me alone!’ Evan struggled that whole night thinking, ‘I have to do something, but I can’t do anything.’”

Two days later, on July 11, 2015, Eilene let herself into Peter’s oceanfront residence to find the place in disarray. When she entered the master bathroom, she saw the crumpled body of her former husband lying on the floor.

“It was not a pretty death,” she said. “It didn’t look peaceful, but painful and agonized.”

At first, she assumed it was a heart attack, but the medical examiner revealed it was related to drug addiction.

“We actually see a lot of this now,” the ME told her. “Wealthy, high-powered executives who overdose and die, usually from some combination of amphetamines, opioids and other drugs.”

An autopsy would show that, weakened and sick from narcotics, Peter’s killer blow was in fact a virulent infection that shut down his vital organs.

From what Eilene could gather, he started out on prescription drugs like Adderall. For the last 18 months of his life, it appeared he was taking crystal meth and shooting up a speedball of cocaine and the opioid tramadol.

As executor of his will, Eilene was aghast to discover that Peter had been spending between $8,000 and $9,000 a month on his habit.

Days after his death, messages started showing up on Peter’s cell phone — from dealers. “Hey bro, need some sprinkles?” “Hey bro, you dead?”

“I considered texting back, ‘Bro, I’m dead,’ but I didn’t,” Eilene said, with a bitter smile.

Four-and-a-half years later, she has switched careers to focus on a new vocation as a social worker.

“What happened really made me think about what I wanted to do with the rest of my life,” she concluded. “People like Peter believe they are too smart to become addicted to anything, or they will manage it, or they will know what they are doing.

“A lot of employees at his level are depressed, anxious and overworked. It’s an issue society needs to address.”