I work for the NHS in mental health and I can assure you that patient confidentiality is taken VERY VERY seriously. No one can see your records or query your GP (or any other doctor for that matter) about your health record without your written permission.
Half of my job is to recruit volunteers, some of whom are ex-mental health service users. We have to have them sign a form that very explicitly states that we may contact their psychiatrist to discuss their capability of volunteering in particular capacities.
I had to fill out a relatively extensive medical survey detailing my vaccinations plus the typical "do you have back problems" sort of thing. That form did in fact ask if I had any mental illness history including depression, etc. and had space to explain further if my answer was "yes" but again I had to sign a very explicit waiver allowing Occupational Health to speak with my GP if they had questions about my answers on the survey.
I do think it depends on the job - I only had to go through all of that because I work directly with vulnerable adults and because I could be exposed to things like Hepatitis on the wards.
I wouldn't worry about anyone having access to your patient records. They will only ever know what you divulge and whatever you give your GP, etc. permission to divulge....
After you start, I don't believe they would ever ask any additional questions unless they had concerns about your performance or, as I mentioned earlier, if they are concerned that you could be exposed to something in the course of your duties....