(AP) -- Here's the challenge. Your wife, Congresswoman Gabrielle Giffords has been shot in the head and is recovering, but still has a long way to go. You also have two teenage daughters and a high-profile, difficult and very public job.
So given all that, how do you fly, in just a couple of months, one of the world's most complex vehicles - the sometimes deadly space shuttle?
Easy, says astronaut Mark Kelly, the Navy pilot and captain who resumed his duties Monday as commander of the shuttle Endeavour's final voyage in April. "Ignore stuff going on in your personal life and just focus on your mission. We get a lot of practice doing that. I've been doing that for 24 years.
"The key word there is being able to compartmentalize things," he said.
Putting aside problems and feelings in little boxes and zeroing in on the tough task at hand - compartmentalizing - is what astronauts, military officers, firefighters, surgeons and presidents do all the time. It's a good coping technique that works, especially for people like Kelly who is dealing with a family crisis, psychologists say.
Kelly explained his focusing abilities Friday at the news conference where he and NASA declared he would indeed lead the space mission he was assigned before his wife was shot in the head on Jan. 8. Giffords is going through rehab work in a Houston hospital, and Kelly wouldn't discuss the extent of her brain damage. There are no reports she has spoken, and doctors previously have said she has limited use of her right side. Kelly says she is making progress every day and "would be very comfortable" with his decision to return to spaceflight.
Most people compartmentalize all the time on a smaller scale. But some people are naturally better at putting aside their feelings than others, or they learn how to be better at it.
"They are ultimately super-rational and super-logical," said psychologist and executive coach Marilyn Puder-York, of Old Greenwich, Conn. "They access their emotions, but they don't let their emotions control their cognition or their behavior or their choices."
Jim Lovell, commander of the Apollo 13 mission that limped back to Earth after an explosion crippled its flight to the moon in 1970, said it is a way of thinking that helps you survive: "You focus on what has to be done immediately. One by one you overcome each crisis as they come along.
"People that live on the edge and do the work that astronauts do, they look at things one step at a time," Lovell said in a telephone interview Monday. "They look at what they want to accomplish and what steps are required to accomplish."
Experts say that for most ordinary people, this is a case of, "Don't try this at home." Puder-York said emotions can "come back and bite you, if you don't process right."
Lawrence Palinkas of the University of Southern California, who has studied the psychology of astronauts and explorers, said "not everyone should simply assume that they can compartmentalize. Generally if they can, it requires more than simply willpower."
NASA and Kelly have a support system as well as experience that enables him to cope in his work, Palinkas said.
It's a skill that NASA fosters and celebrates. In 1969, when a computer alarm came on just seconds before the first moon landing, Neil Armstrong and ground controllers in Houston focused on the task at hand and touched down successfully. American astronauts and Russian cosmonauts used hyper-focus to get through a fire and collision on the Mir space station in the 1990s.
And those are just the examples the public hears about.
"There are people who have flown with deep troubles in their lives, whether it is a parent who is sick, or worse, a child who is sick or a marriage in trouble, who have done exceptionally well in orbit," former astronaut Jay Apt said. "Folks who are under stress in non-aviation may not understand the extent in which you are focused because your whole life has been about focus."
NASA flight crew operations chief Brent Jett said that the space agency monitored Kelly last week as he worked with his crew and did flight simulations, and he did fine.
On Monday, Kelly - a veteran of 39 combat missions during Desert Storm - officially resumed his training duties. He and his five crewmates spent much of the day in simulators practicing launch, landing and docking with the International Space Station, preparing for Endeavour's scheduled April 19 launch. NASA released video of Kelly working in the command seat in the shuttle simulator, telling colleagues: "I'm all set."
That type of training is typical for two months before launch, said Apt, who pulled out his training schedule for a 1996 flight. Days usually start around 8 a.m. and stretch till around 7 p.m. with hours upon hours of simulations. Lunch is even eaten inside the simulator with "the same food you eat on orbit," Apt said.
Experts said this not only trains astronauts for flights, but how to focus.
In some ways people who "are very successful and high achievers" generally feel better because of this well-honed compartmentalizing skills, said Virgil Zeigler-Hill, a University of Southern Mississippi psychology professor. But they also can pay a big price later with an emotional rebound that can hit hard.
"It's kind of a roller coaster," he said.
©2010 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.