When I played the organ at church, people used to ask me how I could possibly do it without being scared to death. My answer was that I did it every week in spite of being scared, then after a few years I realized I wasn't scared anymore. Nothing beats practice in overcoming anxiety.
That being said, there are things that can help. First is being aware of the underlying cause of your anxiety. Usually in that situation, it comes from worrying too much about what other people think of you. Don't try to say what you think the interviewer is expecting you to say, teach him how to solve the problem, as if he was a colleague who didn't know the answer.
The other reason people get nervous is they don't know how to react when they get stuck. The thing to do is think out loud and ask questions. Make the interview a two way street. Don't just stand there silently spinning your wheels until you work yourself into a frenzy. State what you remember and don't remember, and ask for clarification, just like you might while on the job.
Asking a stupid question to get yourself unstuck is better than giving a stupid answer because you didn't ask for help. One time, I arranged a last-minute interview when I happened to be in the state. That company used C++, which I had never used professionally and didn't have time to review before the interview. I told them as much, but they asked me C++ questions anyway. I actually had to ask for class Class1 : public Class2
which was the base class and which was the derived class.
That might sound like interview suicide, but I got the job because I didn't let trivial syntax get in the way of demonstrating my broader experience. The interviewer knew perfectly well I could have googled that in two seconds, and that the alternative was either not answering at all or taking a 50/50 shot that I would confidently make a complete fool of myself.
If you don't get the job, it's not the end of the world. Come up with some strategies for improvement and try again.