I haven't disclosed to anyone at work the diagnosis I have (BPD). I really struggle to come to terms with the diagnosis and wouldn't want any colleague to start looking up information about BPD that then meant I was prejudged.
You can phone ACAS for employment advice (google ACAS helpline) if concerned about your rights.
Do you have an Occupational Health department? You could tell OH that you have this diagnosis but that you don't wish that information to be shared with management. This may be the best approach. If you disclosed complex PTSD then this may also be sufficient in terms of medical records, some people use complex PTSD rather than BPD as a label, it is far more meaningful and helpful in most cases.
I don't think we should be defined or held to what diagnosis we may have been given by mental health services in the past. You should be able to do a job if you want to and not face stigma or shame (not that we should feel shame over our mental health history but I know how complicated it is and how that particular diagnosis hurts).