“He should not melt the heart of his brothers like his own heart!” (Devarim 20:8)
“You may not be frightened before them!” (Devarim 7:21)
It is a negative commandment not to be frightened or be afraid of the enemy at time of war, and not to flee from them. Instead, it is our duty to strengthen ourselves against them, and to stand strong and powerful against them. About this it says “You may not be frightened before them!”, and it also says “He should not melt the heart of his brothers like his own heart!”. Amongst the roots of this commandment are that each and every member of Klal Yisrael must put his trust in Hashem, and not be afraid about his body when he can give honor to Hashem and His people.
Amongst the laws of this commandment are that during the time of battle a person should not think about his wife, children or money. Instead, he should empty his mind of all other things and concentrate on the battle. He should consider that all of the lives of Klal Yisrael are dependent on him, and if he would be scared and turn back, he is considered as if he has spilt the blood of all of them. Chazal also said that anyone who fights with all of his power with the intention only to sanctify Hashem, is guaranteed that he will not come to harm and that he and his children will merit to have a correct house in Yisrael and come to life in the world to come.
This commandment applies to men, as it is incumbent upon them to fight at a period when Klal Yisrael are in their land. One who starts becoming scared and stressed at times of war, has transgressed this commandment and his punishment is very great.