We were sent to La Castela (http://restaurantelacastela.com/) based on a recommendation from a Madrileño we met during some other travels who said it was his favorite restaurant. Take recs from the waiter based on what's good. We were the only tourists there, and it was probably the best meal we had while in Madrid. It's a tapas bar in front, with restaurant in the back. I would say skip the tapas bar to save room. I've sent others who had similar experiences.
Madrid has a bustling live music scene, and it's a good way to do as the locals do. We went to a place called Cafe La Palma that was really cool. Obviously you would just need to check schedules of places when you're there.
Suggest doing a guided food tour in San Sebastian. There are hundreds of tapas places, and of course not all of them are good. We did a private tour. The guide takes you to the best places, orders their specialty, takes care of paying, etc. The history lessons while walking around are of course an added perk.
I could go on. We spent a month in Spain for our honeymoon. Such a badass place. Eat all the jamon iberico de bellota.