There are two things that keep the father motivated to survive in contrast to the son. The first is that he has experienced the world before the disaster. He has knowledge of the pre-apocalyptic world unlike the son who was in-utero when disaster struck. He may have some hope that the old world will be restored in some form. One of the events though that seems to contradict this is his willingness to leave behind some important remnants of civilization. At one point he sits down on the side of the road and empties his wallet. He leaves the contents (including a picture of his wife) behind. He can't imagine a world in which a driver's license or money or credit cards would ever be worth anything again.
The most important reason though for the father to survive is his son. He tells his son that they "carry the fire," a symbol for goodness or hope. The father is in constant state of vigilance in order to keep his son alive and headed for the coast. Without the presence of the boy, the man would probably have long ago taken his own life as his wife did. He survives so that his son, and everything he represents, will survive.