As suicide rates have climbed in recent years, so have instances of employees ending their lives at the workplace.

It happened at a Bank of America Corp. call center in New Mexico in November, at a Ford Motor Co. plant outside Detroit in October, and at Apple Inc.’s Cupertino, Calif., headquarters in April 2016.

Nationwide, the numbers are...