On the first job impacted by my illness they knew because I had to go IP for awhile and had to take FMLA. They didn't know what it was but they knew it was psychiatric in nature. I did tell Human Resources eventually. I resigned when I became too sick to work but then was offered a much better job 3 days later with another company. For me, the job was too good to turn down even though I was pretty sick. My boss knew about MDD, again before I was diagnosed bipolar II. I lasted 5 months on that job before I had to resign.
If I go back to work, I will not disclose my illness unless I need accommodations. Best wishes.