There is essentially zero chance that the potential employer will be in a frame of mind to evaluate your situation with anything resembling the degree of compassion or understanding you're looking for.
If anything they'll be hyper-attuned towards filtering out against: (1) unknowns and (2) risk. Your situation screams both (1)+(2), at very high volume. And even if they do hire you, most likely they'll have you in a "box" mentally, and see you as someone with high flight risk / limited growth potential.
As an alternative... perhaps you can see your next job as a an "escape" form your emotional condition. Perhaps as a kind of a role-playing game as it were. As in:
I'm just here for the paycheck, the routine, and the stability. I don't need these people as an emotional support network. Also, I'm confident enough that I can put on a different "hat" for 8 hours a day. Then deal with my internal situation in my spare time, on my own terms.
Also, you might be pleasantly surprise at what the change in scenery and daily routine does for your internal state. There's a lot[1] of neurophysiological research being done of late to the effect that putting ourselves "through the motions", e.g. smiling at others, being kind and helpful to them; and, when they ask that dreaded question -- "How are you?" -- answering with: "Nice of you to ask! I'm great! How are you!" even though we know they don't really mean it -- that these kinds of habits actually do end up, over time, influencing one's internal state in a positive way.
[1] no references handy -- but I'm pretty sure I've seen quite a few; and it fits my observations of my own mental state and of that of others close to me in this life, generally.
The entire topic of depression in tech is something that needs infinitely more publicity and support than it currently gets.
If you want to see an absolutely phenomenal talk on Developers & Depression then I couldn't recommend this highly enough: http://programme2013.scottishrubyconference.com/proposals/86...
The original question seemed to refer to potential employers, so that's what I was addressing.
And, the employer may not like you bringing it up either - if they decide to fire/not hire you, then you have opened (a slight crack of) a door which might allow them to be easily sued, if they in any way they hint it was because of medical conditions. You will be being kind to them by not putting them in this tenuous legal position.
I opted to be really transparent about it because a.) I didn't want it to be a surprise when I texted in the middle of the night that I wasn't able to make it in to the office and b.) I wanted to work for someone that would be supportive when things went sideways. I was lucky and found a great person to work for who became a very good friend.
There are enough people today that either deal with depression personally or know someone that deals with depression on some level or another. If I was hiring you, I'd want to know about it upfront. I've always told my employees that I can deal with bad news, but I hate surprises.
I'd own it and I'd explain how you handle it and how it won't impact your performance and this is why. I'd be pretty impressed with someone coming to me saying BTW, I've got this issue, but let me show you how I handle it and assure you that it won't be an issue if I work for you.
(http://www.dol.gov/odep/pubs/fact/laws.htm)
> The Americans with Disabilities Act (ADA) prohibits discrimination against people with disabilities and guarantees equal opportunities for individuals with disabilities in employment, transportation, public accommodations, state and local government services, and telecommunications. Two sections of the ADA relate to employment:
> Title I: Employment prohibits covered employers from discriminating against people with disabilities in all employment-related activities, including hiring, pay, benefits, firingand promotions. Covered employers include private businesses, educational institutions, employment agencies, labor organizations, and state and local government entities with 15 or more employees.
(http://www.eeoc.gov/laws/types/disability.cfm)
> The law requires an employer to provide reasonable accommodation to an employee or job applicant with a disability, unless doing so would cause significant difficulty or expense for the employer ("undue hardship").
[...]
> The law places strict limits on employers when it comes to asking job applicants to answer medical questions, take a medical exam, or identify a disability.
> For example, an employer may not ask a job applicant to answer medical questions or take a medical exam before extending a job offer. An employer also may not ask job applicants if they have a disability (or about the nature of an obvious disability). An employer may ask job applicants whether they can perform the job and how they would perform the job, with or without a reasonable accommodation.
http://www.mind.org.uk/mental_health_a-z/8069_disability_dis...
You might want to say something like "many people suffer mental health problems of various severities. I'm one of those people, but I'm aware of my mental health and I know where to go and what to do if I feel it's slipping". (If that's true.)
http://www.kent.ac.uk/careers/disabled.htm
> It is not compulsory for job applicants to disclose a disability: under the Equality Act 2010 it is, in most situations, illegal for employers to ask about health and disability issues when recruiting until a job offer has actually been made. Whether you choose to declare a disability before this point is therefore entirely up to you. However, there are some good reasons for telling a potential employer about a disability
A tip for the interviews, check this video http://www.ted.com/talks/amy_cuddy_your_body_language_shapes... it may help you :D
If they're a good company and your boss is not a bastard he will propose you stuff to make you feel better.