If you're under a doctor's treatment for depression get a statement, on paper, from him/her.
Whatever they ask you to sign, insist that you be able to add explanation to that same piece of paper. No addendum, no signature. Never let them put only the company side in your file.