If you are a resident in Spain and have lost your UK driving licence and you have no certified copy, contact the DVLA in Swansea, and ask for a Form / certificate D737 which shows all the relevant details of your current driving licence. This can be used to replace it for a Spanish driving licence. There is a fee of £5 which can be paid by credit card.
DVLA's web site is
www.dvla.gov.uk.Switchboard Telephone No. 0044 (0)1792 78 2341. Leave the (0) off if phoning from outside the UK.
Opening Hours – Monday to Friday 8.15am – 4.30pm
If your driving licence is registered with Trafico you should be able to get a replacement Spanish licence from them.