Welcome to the board...
I suggest you do what many do on New Year's in Madrid...stuff your body into the Puerta del Sol and enjoy the ambience. Bring a dozen grapes and as the "reloj de antaño" on the city hall strikes twelve, swallow the grapes like everyone else.
Sure there are plenty of clubs...do a search on this site for others' opinions on that. On the 31st, though, if you're in Madrid and not in the Puerta del Sol, shame on you...