How to recover when your mind freezes up during an interview?
It's recommended that you prepare beforehand so that if you have a total freeze, you can always pull from one of the answers that you worked through and crafted ahead of time.
If you're asked a questions and you feel completely lost, take a few moments (10 seconds or so) to gather your thoughts. You can even say, "That's a great question; let me take a few moments to gather my thoughts..."
Taking a pause to gather yourself, is respectful, and shows how important this opportunity is to you. And sometimes just repeating the question back to the interviewer, to ensure you heard correctly, can kickstart your inspiration enough to find an answer.
So take a deep breath, think it through, and then proceed with an answer.
In the end, if you feel unsure of your response, you can follow up with, "I'm not sure whether I fully answered your question. Was there an aspect of it that I missed, that I can elaborate on?"
Additional Resources: