As a man with a history of mental problems, Brandon Marshall was having a bad day last Dec. 10. At a noontime conference at the Saratoga offices of his employer, set-top device maker Roku, the quality assurance engineer furiously ingested pills.

At one point, the 43-year-old pulled out his mobile phone and called his father, a Sunnyvale dentist, to pick him up. When Marshall wandered outside, someone called 911.

Described by firefighters as acting “manic,” Marshall nonetheless began negotiating with paramedics, who were on the phone with Marshall’s father when Santa Clara County sheriff’s deputies Kristin Anderson and Aldo Groba arrived.

A wrongful-death lawsuit filed by Marshall’s family says that when Anderson approached him from behind, Marshall swung a key fob at her, described as a short, rounded aluminum rod. Groba, a 14-year veteran, then shot Marshall in the stomach.

Over the phone with the paramedics, Marshall’s father, Steven Marshall, heard his son cry out in pain. Within a few hours, the engineer died at Valley Medical Center.

Self-protection

The story happens too often. Feeling threatened by the mentally ill, cops fire to protect themselves and ask questions later. Deputies originally described the key fob as a spike — and, according to the lawsuit, knelt on Marshall’s back to put handcuffs on him.

Brandon Marshall, however, was no ordinary victim: He was one of a handful of named plaintiffs in a historic lawsuit brought against the anti-poaching policies of companies like Apple, Google, Intel and his former employer, Adobe.

His estate will undoubtedly get some money from that lawsuit, which charged that the companies colluded not to hire one another’s employees, limiting their workers’ career options and earning power. A dispute is raging about whether the original $324 million settlement was adequate for more than 60,000 engineers.

Marshall struggled with money as much as with his mental illness, but he cared for his family. Four days before he died, he left behind a handwritten will that seemed to reveal a sense of his mortality. “In the event of my death,” he wrote, “I would like my entire estate to go to my wife, Laurel Bresaz. She will know what to do with it.”

Although there is much we still do not know about the shooting — authorities have not released the police reports, or pictures of the key fob — I would not be surprised if the county winds up paying a significant amount to settle.

“These cops gunned him down when he needed help,” said James McManis, the attorney for the family. “The paramedics were working with him and his father. Just to be gunned down like that, it’s just wrong.”

Rejected claim

The county has already rejected the family’s legal claims. When I asked the county for a response, I got this email from County Counsel Orry Korb. “Brandon Marshall’s death is tragic. Because your request concerns pending litigation, I cannot comment further.”

Since the McManis firm brought the lawsuit more than two weeks ago, I’ve been poking around trying to fill in the blanks of Marshall’s life. The Marshall family has deferred comment to McManis. But in my research, a picture emerges of a man who was passionate, sensitive, mechanically adept and restless in his career.

“He was a really nice guy,” said his Sunnyvale neighbor, Johanna MacLeod. “He liked to tinker with motorcycles. And he was definitely into tech.”

A local product, Marshall graduated from UC Davis in 1991 in rhetoric and communication. He then enrolled in Santa Clara University’s law school but quit before achieving a degree. In 2000, he earned a postgraduate degree in computer science from Swinburne University in Melbourne, Australia.

Nomadic career

Marshall worked at more than his share of Silicon Valley companies — among them, Adobe, Google, 4INFO, Onlive and Roku. His specialty was “quality assurance,” a job that involved spotting bugs in the code other engineers had written.

On Marshall’s LinkedIn page, a fellow engineer at OnLive, Tom Costales, wrote this: “Passion comes to mind immediately when I look back on my work with Brandon. I could rely on Brandon to flush out areas that needed testing and it seemed before I got back to my chair, there were bugs coming in already.”

For that matter, Marshall had a keen sense of the hubris of Silicon Valley. In a recommendation he wrote for another engineer on LinkedIn, he singled him out for not being like engineers who were “all too aware of their brainiac status, sometimes wielding it like a club.”

It was during Marshall’s six-month stint at Adobe in 2006 that he noticed a pattern that led to his joining the federal anti-poaching lawsuit as a lead plaintiff.

The court papers say that it was common then for companies to “cold-call” engineers for recruiting. But Adobe was on the “do not call” list of Apple, which became one of the defendants. “He (Marshall) believed he was harmed by such agreements,” a filing by his lawyers said.

There was some risk to the lawsuit: Engineers who sue Silicon Valley companies often diminish their own chances of hiring. And Marshall clearly felt the criticism. “You know how nasty and abusive folks get in online comments,” another class plaintiff, Michael Devine said to The New York Times. “It apparently really hurt him.”

Bankruptcy

Nor was that his only problem: In February 2012, Marshall filed for Chapter 13 bankruptcy. Among his assets, he listed more than 30,000 worthless shares of Onlive, a cloud gaming company that laid off a substantial number of employees in a reorganization that year.

Marshall and the six other plaintiffs made history when their lawsuit showed that Steve Jobs and other Silicon Valley leaders had colluded with one another to keep from poaching employees.

I have a feeling that he will make another kind of history, posthumously: A victim of a strange series of events that probably could have been avoided.

There was a bug in the county’s emergency system that day in December. Brandon Marshall just couldn’t identify it in time.

Contact Scott Herhold at 408-275-0917 or sherhold@mercurynews.com. Twitter.com/scottherhold.