Determination, good health, good physique and skill are four of the main factors. Also, the ability to not panic and to follow orders in stressful situations is important. While in the beginning this is a matter of concentration and courage, it does become more of a skill later on.
Or rather, a neccessity. Given time, humans learn to cope with almost everything. Including seeing blood and entrails everywhere. But a human heart can only take so much abuse before 'shutting down', deadening normal emotions and leading to a variety of mental disorders.
A perfect soldier isn't exactly a sane one. All he has to do is keep his mind focused on the tasks required of him, regardless of emotional scrupules.
This just means that learning to cope with 'normality' takes it's own time once more. Sometimes the time required for that is longer than the years the person has left.
So, in the longer run, it's about the mind. Because heart can (and some would argue must) be deadened in the long run.
In the battlefield, empathy is a precious commodity most lose all too quickly. But for a soldier, an average grunt, that empathy is not necessary for winning the war. Brutal, but unfortunetaly true. The problems with soldiers that have lost their empathy won't truly start until after the war...