They feel they leave behind no legacy. He seems to be saying they know they were really not as important as they thought they would be. This is their reason for fighting against death. They feel they must do something worthwhile or important before the die. For that reason, they fight to make a last minute effort at immortality.
In the third stanza, he describes "good men" meaning those who did leave some impact or were a hero of some type. He describes these accomplishments as "frail deeds" meaning they may have seemed important at the time but were truly not as significant as they thought. They want to retain their glory and ensure they will be remembered. This probably is describing a person who may have done some important deed in their youth and has to hold onto that as their legacy. They are similar to the high school sports star that will spend the rest of his life bragging about his few accomplishments. They fight against death because they need to hold onto their legacy. They know that when they die that legacy will die with them and they will lose any hope they had of immortality in legend. .
In the fourth stanza, he describes "wild men" meaning those who were carefree or rebellious. The phrase "they sang the sun in flight" means they lived for the moment and the here and now. They never gave much thought to what impact their actions would have. He almost seems to be describing those who live by the motto carpe diem, meaning seize the day, and live life to the fullest at the moment they are in. The phrase "grieved it on its way" in the second line refers to living for the moment and living every day as if it could be your last. By saying they "learn too late" he is saying they don't realize until death truly is upon them, how fruitless it was to live that way and how much they truly missed in life. They fight against death because they feel their life is not complete.