SAN JOSE, Calif. – Silicon Valley has long lured entrepreneurs into shiny co-working spaces and start-up accelerators, promising them the chance to create the next Google, Facebook or Uber.

But most start-ups fail, a risk some said is growing as funding begins to slow. For founders and employees, the results can be devastating.

"It sounds good on paper, but that's not really how it is," Dr. Michael Freeman said of the Silicon Valley dream. A psychiatrist at the University of California at San Francisco who counsels entrepreneurs, Freeman likened the tech boom to the Gold Rush. "A lot of people in 1849 came to California looking for gold. And some people found it — and most didn't."

Lately, it's the entrepreneurs in the "didn't find gold" category making headlines. San Francisco-based smart motorcycle helmet maker Skully ran out of funds and shut down in August after its founders were accused of spending company money on luxury cars, vacations and strippers. Weeks later, job platform WrkRiot went offline after a former employee claimed the founders forged wire transfers because they couldn't pay workers.

Those failures can be crushing for employees — and not just because they lose a job.

Zirtual founder and CEO Maren Kate Donovan felt heartbreak when her start-up went under last year.

"It was the death of hopes and dreams," she said. "It was the death of a community that I and my co-founders had spent five years building. … It was absolutely devastating — definitely one of the worst things I've ever been through."

Zirtual, a San Francisco- and Las Vegas-based start-up, matched small-business owners with remote online assistants. The company ultimately was resurrected after being acquired by Startups.co, but Donovan didn't stay.

Silicon Valley hadn't prepared Donovan for failure. People rarely talk about start-ups that don't make it, Donovan said. Now she offers one piece of advice to other entrepreneurs: Get a therapist.

Failures don't just affect the founders and employees — customers also pay the price.

Emilie Fairbanks, a lawyer who runs a small practice in Washington, D.C., used a Zirtual assistant for three years before waking up to an e-mail that said the company was no more. Fairbanks panicked. She changed the passwords her assistant used, got a new credit card and ran damage control with clients used to e-mailing her assistant — and now were seeing their e-mails bounce back. Fairbanks worried it made her look unprofessional.

"It really has made me less willing to use other start-up services," she said.

Still, for entrepreneurs, failure is nearly a Silicon Valley rite of passage.

"The cost of failure has gone down pretty dramatically … and that's a good thing in some respects, but that's also a bad thing," said Harvard Business School professor and start-up expert Shikhar Ghosh. "It creates a certain recklessness."

Start-ups may fail because there's no market for their product, their technology doesn't work or because they grow too quickly or too slowly. But personality also comes into play — entrepreneurs tend to have an appetite for risk, an elevated level of self-confidence and a tendency toward aggression, Freeman said. Those qualities can be effective in business, but they also can make a founder unwilling to compromise or listen to his or her board — factors that can lead to a company's implosion.

Those personality traits also may be what keep some bruised and battered entrepreneurs coming back for more. After Zirtual crashed, Donovan considered jobs at large corporations. But she signed on as chief operating officer at Roam, a start-up that rents international co-living spaces.

"I'd much rather do something that's a little high risk," she said, "and really, really love what I'm doing."