How do I respond to a professor’s email refusing my recommendation request?
You don't need to reply to him at this point, what you should do is to follow his advice and contact the head of department.
You could, if you really want to, reply to him saying thank you for the advice - but this may or may not be received as you expect - far simpler to leave it and move on.
I would send an e-mail with the reply
Thank you very much for your time. I will follow your suggestion.
You're over-thinking this.
Professors are people. Communicate with them however you would communicate with other people in a more senior position than you. There are no special rules.