It's very common for the employer to ask for your health problem to be assessed if you've been on long-term sick leave.
There might be a way of retaining your job but in a different Dept etc or with concessions to your ailment but first the employer needs an independent assessment. Your employer can 'medically retire' you on the basis of health grounds but I wouldn't automatically accept if you can help it, as it could make you appear less employable in the future ' harsh I know, but possible. If this happens you could claim invalidity benefit so you won't be destitute. I'd phone the Citizien's Advice Bureau for up-to-date information on what the best course of action will be, and which benefits you may be eligible for. Most of all don't worry! This is what the Social Security system is all about; it is there to help you and you've paid into it for 31 years! All the best for the future.