First an old tip from NLP that I have used before giving presentations and with anticipated difficult meetings. It works!
Decide on where you could possibly meet.
(a) In a corridor
(b) Formally introduced by one other person
(c) At a meeting table with lots of others present
(d) whatever else you deem to be likely
Decide on a simple strategy that will work equally well in all the above cases with only minor tweaking for the different circumstances (see below)
Visualise each situation in turn and visualise it going well with everyone smiling at the end of it.
Repeat from 3 until you can only see good results. If you can't sleep one night then do these visualisations of success repeatedly instead of counting sheep. You will feel great and fall asleep with a smile on your face.
Note
Situations we imagine sufficiently vividly have the same effects on our brains and bodies as the real thing. When you enter the meeting, that smile will automatically come back and radiate to others.
The strategy
What is your goal? (a) Be as least embarrassed as possible? (b) put the other guy down? (c) put yourself down before he can? (d) make everyone feel good including you, him and any listeners?
I could suggest strategies for each but the only one that I will talk about is (d)
Think about what was good about the situation.
For you: You gained experience that helped you sail through later interviews. You got a position you enjoy and got promoted, i.e. "What doesn't kill you makes you stronger!"
These are reasons you are grateful to him. He made you a stronger, better person, so tell him!
Why tell him? There are many types of person in this world but (apart perhaps from Buddhist monks) there is one thing they all have in common: They want to feel important and noticed. This is especially true if they are made to look good in front of others.
Presumably you are not a trained psychologist so don't try to mind-read what he was doing during the interview. He could be a bully. He could have watched a video about how to be a tough interviewer. He might be a "Don't suffer fools gladly" type (particularly common in technical fields). You can't know so assume the best, i.e. He was simply trying to be a good interviewer and that was the technique he chose.
An example basic strategy
Note: You have to tell the truth. It must be sincere so adjust the words to fit your personality and beliefs.
You say, "Hello John, I've got something to thank you for. Your interview technique is really tough but I learned a great deal from it and it helped to get me where I am today."
Play with the words so that they are true and natural.
The tweaks
(a) He tries to put you down (maybe in front of others)
John: Oh hello bobby, have you recovered from our last meeting yet? {laughs and looks around for approval}.
You: Hello John, yes, actually I've got something to thank you for. Your interview technique is quite something but I learned a great deal from it and it's actually helped me get where I am today.
(b) He's embarrassed because you're now at his level (if you are).
John: Uh, hello bobby, um, I'm sorry about that interview, er I was a bit harsh.
You: That was a tough interview but to be honest I have to thank you for it, etc.
(c) He pretends you've never met or avoids your eyes.
You (when you have a quiet moment together): Oh hi John. How are you? You know, I've got something to thank you for, etc.
Finally
You can compliment John in his absence by saying, "You know I'm grateful to John. He gave me a tough interview but it made me realise that, etc.
People will think you are a nice person and trust you not to say bad things about them behind their backs.
It will get back to John that you think highly of him and he will be better disposed towards you.
Warning
Don't become overly friends with John until and unless you know him really well. If he is the wrong type then you don't want to keep buttering him up or go for drinks until you are certain.
I hope some of that is useful.
Afterthought
I recommend you never memorise words or sentences whether for a presentation or anything else. They will come out stilted. Practise in your head but don't memorise. Trust that when the time comes you know what you want to say and the right words will come out. Always think of the message not the words.