Ensure you go to a state or public hospital and they should accept your EHIC and treat you for free. The card entitles you to be treated on the same basis as a Spanish national. I'd advise you to find out where the nearest public hospital is before you go.
Also, there may be a local health centre that may be able to do it for you. Ask a pharmacist for the nearest public doctor. If you are charged, and it wasn't a private clinic, retain any bills and receipts and apply for reimbursement when you get back to the UK by ringing 0191 218 1999 for a claim form.