G-d Fights Our Battles
The Torah describes the two types of wars that the Jewish people will fight upon entering Israel. The first discussion relates to the Milchemet Reshut, permissive war, and the laws that go with it.
Initially, there is a call for peace with specific options. They can elect to leave the Land of Israel and never come back. They can make peace and live in Israel as Ger Toshav, resident stranger, and observe the Noachide Laws, and remain. They could also choose war, which they will lose.
This applies to residents of cities that are distant from you. But regarding the seven nations living in your land, there is only the obligation to utterly destroy them all. They are pure evil and we must not learn from their evil ways. This battle is called, Milchemet Mitzva. We are doing a merciful act by eliminating this evil from the face of the earth.
It is interesting to note that when these wars are fought, it is a given that we will be victorious. The reason is because Hashem is fighting the battle with us.
It should be reassuring for us to know that when we are forced to fight our enemies, Hashem will make certain that we will succeed. We are not promised the number of casualties that we might have to sacrifice.
The most important thing we can do during times of war, is to recognize that the victory is His. This will help speed up the battle with less casualties and a swifter victory.