But even though the Americans with Disabilities Act forbids companies from firing people with mental health conditions as long as they can do the “essential functions” of the job as determined by the employer, people may not feel safe coming forward.

And there is reason to worry.

DeBorah Ingegno, who now works as a doula, a nonmedical person who assists during childbirth, said that when she was hired at a California health food store a number of years ago, she told her employer that she needed Fridays off. When asked why, “I told her I had a group I had met with and left it at that.”

Her boss then inquired casually several times about what kind of group, and after Ms. Ingegno, who lives in Hartford, Conn., felt more comfortable in the job, she revealed it was a bipolar disorder support group.

While the supervisor initially seemed accepting, a week later, Ms. Ingegno was fired, and told that her illness was affecting her work.

“I was stunned. I’d been getting ample compliments from the women training me and from my boss herself,” she said. Ms. Ingegno is now self-employed, but were that to change, she said, “I will never again disclose a mental illness to any employer.”

In one recent study of 600 people with disabilities, roughly half involving mental health, about a quarter of the respondents said they received negative responses to revealing their problems — such as not being promoted, being treated differently or being bullied, said Sarah von Schrader, a senior research associate at Cornell University’s Employment and Disability Institute.

That was part of the reason Scott Stossel, editor of The Atlantic magazine, kept his severe anxiety secret for 35 years from everyone but his immediate family until his book “My Age of Anxiety” was published this year.