Oh dear, sorry to hear that.
You need to go to your local centro de salud, that's probably your best bet.
You can find details of your local one here.
Do you have your medical card? If not, just turn up with proof that you pay your social security and copy of NIE and I think that should be enough. They will issue you with a card if you haven't got one. It's been a long time since I did it so can't quite remember the process.
The number of the centre is on the page I linked to above so if your Spanish is good enough maybe give them a call before going down there.
Hope that helps and hope you feel better soon.
Justin