Fear and claustrophobia are not in-flight issues. 

 - astronauts spend years training inside spacecraft mockups, any claustrophobia issues will have surfaced before flight. 
 - Fear is mitigated by training for every possible emergency. During launch, astronauts are calm because they know what to do if anything bad should happen (source: lecture by astronaut André Kuipers).

People who have fear and anxiety issues wash out during training, or conquer their fears. 

Early astronauts were selected from the group of test pilots: people that were already selected for their ability to remain calm and function efficiently under stress. 

As a result, the Apollo astronauts routinely showed heartrates that ware barely elevated, even in high-stress situations.