Indirection and anonymization. The details of each individual aren't supposed to be shared but a healthcare professional can recommend changes to the manager that if implemented would promote a healthier workplace. They can point out that the whole workplace is stressful and talk to the managers about how they can improve that. Hopefully deadlines will be addressed.
There's an entire medical specialty devoted to this: occupational medicine.
> Employees are more likely to keep that kind of thing a secret because they likely believe knowledge of it will make it harder to get raises and promotions.
Unreasonable deadlines are likely to stress entire groups of people, not single individuals. It's worth addressing as an issue affecting the collective workforce.
How would this information be useful if it's not shared with the boss?
Regardless, I don't think the biggest issue is people are afraid that the information will be shared, but that there's a stigma around being associated with a mental health issue that causes lower productivity in the workplace. Employees are more likely to keep that kind of thing a secret because they likely believe knowledge of it will make it harder to get raises and promotions.