So, let's start with the basic awareness that an interview is always a somewhat fake context that is an attempt for the company to get to know you, without expending massive time on the process. Every company and every person within a company is trying to find an optimal way of seeing (as Joel Spolsky puts it) - you are smart and capable of getting things done.
1) What are some ways to deal with this situation?
The basic problem is that brains aren't the easiest thing to program. A computer doesn't care if someone is staring at it. A human does. So the intelligent, rational stuff that you come up with when calm become unavailable in the face of an intense emotion (in particular, stress). I often tell folks in presentation coaching - "stress is a mind killer". There's some physiological evidence that the adrenaline and other chemicals involved in a stress-reaction (even a minor one... hopefully going on an interview is NOT the same stress level as being chased by a saber toothed tiger!), can literally change how your brain works.
So... the tips and tricks are partway connected to changing your body's reaction to the current environment:
- Take a few deep breaths. Try not to go all Zen Master right there in the room with crazy deep breathing like you might do in a yoga practice, but do look calm and take an intentional breath or two. Controlling your breath is a good way to tell your body "see, we're fine, no saber toothed tiger here, stop with the adrenaline"
- Get good posture - First, it just makes you look more confident, second, it helps get air and blood flowing through your body to your brain, which is always good.
- Pausing is fine - realize that collecting your thoughts is a good thing. If you find yourself chasing butterflies in your head, there's a focus problem, but don't worry about the interviewer and what he's thinking.
- Look up or to the side when thinking - these are common confident thinking positions, and it means you don't have to look at your interviewer while thinking.
- Practice - get friends to help you get practice - simulate the nerve-wracking context of the process as closely as possible, and go through it until it becomes a more comfortable experience.
I would say, as well, that I know it's hard to let go of concerns about what the other guy is thinking so you can focus on actually answering what you are asked. Practice and sheer will to focus are probably the only fixes, and at that they are only partial.
2) What do interviewers try to achieve when they test people this way? It's not that the job requires solving problems when someone sits in front of me, and if they are trying to see if I manage time pressure, why not give me a deadline and leave the room?
First, there is no perfect. As I said, interviews are a simulated context.
But I'd disagree with the premise that "it's not that the job requires solving problems while someone sits in front of me" - I have yet to see a knowledge working job where people didn't have meetings to have problem solving discussions. A robust team will question each other, and expect people to think on the fly, and coming back an hour after the meeting with the "right" answer that you've now thought out in privacy is often frustrating to everyone else who would like to debate the idea.
It's easy to say "yeah, but I'm on the team, the process of judgement and selection for a job is over, so the pressure level is very different" - true. But in a crisis, or in a high profile case, you may be problem solving on a team that involve a big boss, or a customer, or someone who is in a position to judge you and determine the future of your career - so the judgement is never really over.
I don't often ask people pat questions in an interview that are classic problem solving type questions - the stock questions are pretty easy to memorize and I find the context to be extremely fake. But I do ask people to talk with me about something hard, and I try to pose questions that will make them think and come up with new thoughts on the fly, so that I can see that the person is capable of creative problem solving.
Lastly, most interviewers WILL take nerves into account, particularly if the job is not a highly public, intentionally high-pressure type of work. For example, pretty much every engineering manager expects that interviewees for engineering roles are nervous in front of people they've just met. Being jumpy, and slightly scattered is a known situation, and as long as a candidate can stammer out an intelligent answer, most interviewers will rate the quality of the thought much more highly than the smoothness of the presentation. We all realize that most engineers are better once they've actually gotten comfortable with their team.
I've even gone so far as to have a mental model for which of my interview panel is most likely be fear inducing. So if Scary Guy says "this guy was a mess", but Not Scary Guy says "he did OK", I figure that it was the scary nature of my scary guy, and not some debilitating quality in the candidate.