In reply to freerangecat:
Wow, what a coincidence. I have just come back from lunch and my current manager was there too, chatting with our ex-manager and this sort of thing was mentioned.
From what I can gather, only certain people will be made aware of your past mental health issues (ie, Occupatinal Health). They will be able to give advice to the employer regarding the suitability of the job for you, and if frankly it is likely to damage or exacerbate any previous condition/injury, then the recommendation may be that the job offer is withdrawn. This is perfectly legal; the onus is on the employer to ensure that they aren't inadvertently going to damage you any further. My employer had a case like this recently, but was with regards to the physical unsuitability of the person for the job; we were threatened with, then taken to tribunal quite swiftly (and suspiciously; it was suspected that the person concerned was pulling a bit of a fast one). The day before it went to court, the case collapsed and the person withdrew their claim. Although this person had had a job offer tendered to them, it was subject to a health check, and it was found that with his health impairments (back problems, angina, grossly overweight, etc) the job (a physically demanding one) had a high risk of damaging him further, even with adjustments in place. The job offer was therefore withdrawn.
The other side of the coin is that if you are employed, in post, and similar issues raise their head at you again, it helps the employer to support you and assist you in getting the right help/support, early rather than later. Since the Black and Boorman reports, large employers are under pressure (as are all, but the smaller employers tend to ignore a lot of good stuff) to do all they can to put in supportive systems (eg equipment, changes to work patterns, shift patterns, lengths of shifts, flexible working, etc) keep people at work and look at their strengths rather than their weaknesses. Workers are incredibly valuable beings, believe it or not and we don't want to lose what we have! Although there is a legal requirement to make "reasonable adjustments" to the workplace and work systems where possible to accommodate various physical and mental issues, it is not a requirement to do so to the 'nth' degree or where there is a detrimental effect on work colleagues.
I know on balance that this looks a bit grim, it really isn't; by being honest you are ensuring that you really are going to be the best person for the job, and job is the best job for you. Being honest helps employers to get the best fit and ensure that in the long run, they get the best out of you by NOT exacerbating existing injuries/issues you may have.
Good luck,
Sx