There are a number of insurance products available to protect your mortgage, though the most relevant for you from the question, would be just the unemployment part of an Accident, Sickness and Unemployment policy. Essentially this will pay out for a pre-defined period of time (Usually 12 or 24 months) in the event of you being made redundant. If you're sacked or just choose to leave your job the policy will not pay out.
If you decide to buy a policy check the deffered period as some policies will start to pay out immediately but with others you have to be out of work for two or three months or more before they start to pay. Also, if you feel you might loose your job soon it may be too late to get a policy as most have a three month qualification period, by which it means if you loose your job in the first three months of the policy you don't get any help.
Many policies are also limited to around 60% of your total earned income, so if you usually are paid �1,000 per month then the maximum benefit under a policy would be �600. Also if you take a joint policy (with a husband or wife for instance) then if only one of you is out of work you'll probably find they only pay half the benefit.
Hope this helped!!! Try Paymentshield for a quote as they offer the first three or six months free. Alternatively find an independant financial or mortgage advisor in your area for help. Buying on the internet is sometimes slightly cheaper but you may inadvertently purchase an inappropriate policy.