The Dubno Magid (Sefer HaMiddos, Bitachon ch.5) writes, "When a person is afraid of something, like when he is afraid of war, the fear is a trigger that what he is afraid of should happen to him. As it states (Iyov 3:25) לִי יָבֹא יָגֹרְתִּי ֶׁרוַאֲש וַיֶּאֱת ָיֵנִי פָּח ַדְתִּי פַחַד כִּי, 'For the matter I feared has befallen me, and what I dreaded is coming upon me.' Therefore, Chazal (Brachos 32b) say, 'Four matters need chizuk' and one of them is bitachon. As it states (Tehillim 27:14) 'ה אל וקוה לבך ויאמץ חזק 'ה אל קוה, 'Hope for Hashem, be strong and He will give your heart courage, and hope for Hashem.' And it states (Yeshayah 30:15) גְּבוּרַתְכֶם תִּה ְיֶה וּבְבִטְחָה בְּהַשְׁקֵט, 'with tranquility and trust shall be your might.' This is because fear causes one to fall and to break, and the pathway to yeshuos is bitachon."
It states (Devarim 20:8) כִּלְב ָבוֹ אֶח ָיו לְבַב אֶת יִמ ַּס וְלֹא לְב ֵיתוֹ וְיָשֹׁב יֵלֵ ךְ ה ַלֵּבָב וְרַ ךְ ה ַיָּרֵא הָא ִישׁ מִי וְאָמ ְ רוּ הָעָם אֶל לְד ַבֵּר ֹּׁט ְרִיםהַש וְיָס ְ פוּ, "The officers shall continue to speak to the people and say, "What man is there who is fearful and fainthearted? Let him go and return to his house, and not cause the heart of his brothers to melt, as his heart." The Dubno Magid asks, Why should we care if he causes others to be afraid? Regardless, the salvation comes from Hashem, and not from the strength of man! As it states (Devarim 3:22) לָכֶם ה ַנִּלְחָם הוּא א ֱלֹק ֵיכֶם 'ה כִּי תִּירָאוּם לֹא, " Do not fear them, for it is Hashem, your G-d, He is fighting for you." The Dubno Magid answers that it is critical that the soldiers who go to war shouldn't be afraid. He writes, שליו לב על מפלה ולא מפחד לב על הישועה תבוא לא ומעולם, "It never happens that a salvation comes to a heart that is afraid, nor does the tranquil heart experience downfall."
קצר, short pasuk, a short phrase of expressing bitachon – all that he says is מחסי 'ה, "Hashem is my refuge" – and that is sufficient for him to receive his salvation.
The chapter describes many dangers. For example, it states in this chapter (91:5) תירא לא יומם יעוף מחץ לילה מפחד, "You will not fear the fright of night, the arrow that flies by day." This is all because you say מחסי 'ה, "Hashem is my refuge."
Regarding kriyas Yam Suf, it states (Shemos 14:20) וּמִש ְּׂמֹאלָם מִימִינָם חֹמָה לָהֶם וְהַמ ַּיִם, "The water was to them like a wall from their right and from their left." The Imrei Baruch of Vizhnitz zt'l says that וְהַמ ַּיִם (with the kollel) is gematria 102, which is the gematria of אמונה. And להם is gematria 75, בטחון. So, חֹמָה לָהֶם וְהַמ ַּיִם means that emunah and bitachon is the wall that protects us. No missile can penetrate this strong wall.
The Dangers of Fear
The army sends a select group of people home when there is a war. One of them is someone who built a home and didn't live in it yet. As it states (Devarim 20:5) בָּנָה ֶׁראֲש הָא ִישׁ מִי אַחֵר וְא ִישׁ בַּמ ִּלְחָמָה יָמוּת פֶּן לְב ֵיתוֹ וְיָשֹׁב יֵלֵ ךְ ח ֲנָכוֹ וְלֹא ׁחָדָש ב ַיִת יַח ְנְכ ֶנּוּ, "What man is there who has built a new house and has not yet inaugurated it? Let him go and return to his house, lest he die in the war, and another man inaugurate it."
The Maharal (Gur Aryeh Devarim 20:5) explains, "There are people who feel bad and have הדעת חלישת (disappointed and down) when someone takes what is theirs. When a person has הדעת חלישות, this results in him having a bad mazal, and therefore, he might die in war. It can cause death." We understand from this Maharal the importance of feeling happy and upbeat. This attitude is a protection. Sad, disappointing feelings can lead to one's downfall.
Arvei Nachal (Vayeitze Drush 2) writes, "It is forbidden to be afraid. The Gemara tells that Yehudah bar Noson walked behind Rav Hamnunah, and he was krechtzing. Rav Hamnunah said, 'This person wants to draw onto himself yesurim.' As it states (Iyov 3:25) כִּי לִי יָבֹא יָגֹרְתִּי ֶׁרוַאֲש וַיֶּאֱת ָיֵנִי פָּח ַדְתִּי פַחַד, 'For the thing I feared has befallen me, and what I dreaded is coming upon me.'" The Arvei Nachal explains that fear is like a "magnet" which draws metals to it. So, too, fear draws the matter he is afraid of onto himself. When he has a good fear, like Yiras Hashem, he draws the shechina onto himself, keviyachol. And when one is afraid of something else, chas v'shalom, he draws that matter onto himself.
The Beis Aharon said, quoting his father, Rebbe Asher of Stolin, יחוש לא המאמין (Yeshayah 28). This means that when one believes in Hashem, he isn't worried.