They're not mutually exclusive things. War can be genocidal. If a people is wiped out, then genocide has occurred. If the mechanism for genocide was war, this doesn't negate the fact that there was a genocide.
But can we say that the wiping out of the people was the result of genocide, or of war?
Except it's not phrased that way in the Bible. The commandment is "do not murder". It's not "don't take life... unless life needs to be taken".
This is true. However, conceptually , the idea of murder and the loss of life is that life should not be taken. In fact, life should be preserved wherever possible. However, there are also circumstances in which life must be taken. We may use different terms for the different situations in which life is lost. However, I see the loss of life as the loss of life. Period. Loss of life is always terrible, however the situation in which it occurs will determine the morality of it.
Why would you mourn the loss of life?
Because loss of life is a terrible thing.
I certainly hope I'd never feel good about the loss of life.
If the act was commanded by God, then isn't the result greater or better than what would've happened otherwise?
That doesn't mean I should be happy that the person's life was lost.
If you really had no other choice, then there's nothing to mourn in the killing of one enemy to save ten friends, or the killing of a hundred enemies to save your town. The only other option open to you would have resulted in even greater loss of life. The greater good was satisfied, God's command was followed and life was protected as much as possible. In all that, what elicits anything other than joy if you really believe it?
But see, in the Jewish moral system, one should not rejoice that their enemies had died.
We are taught that the angels rejoiced, when the Egyptian soldiers were drowning in the Reed Sea. But God chastised them, reminding the angels that even the oppressors of the Jewish people are Gods children.
From this we learn that even if the death of a person was for a good cause, and even if it was necessary for a greater good, one should not rejoice. To do so would be arrogant. After all, the death of that person is still a human life that God took the time to form. That person had a family, a life, a home, a country to defend, etc etc etc.
So while it may be necessary to take someone's life, we should never feel good about it. For even that person is a creation of God.