Elevating Sparks Through Battle
כי תצא כו' על אויביך
"When you go out to war against your enemies" (Devarim 21:10).
The Torah opens the parsha with going out to war against one's enemies, which the Sfas Emes reads as the inner avodah of confronting one's spiritual foe.
ר"ל כשהוא בפנים והוא בן חורין
That is to say, this refers to when a person is on the inside and he is a free man.
The phrase 'going out' presumes a person who already stands secure on the inside as a free man, master of himself.
אז הוא עיקר העסק לצאת כשהוא שליט על האויב
Then the essential work is to go out [to wage war] while he is in command over the enemy.
The real labor begins precisely when a person has the upper hand over the enemy and goes out to engage him from a position of strength.
וז"ש רש"י במלחמת הרשות, כי כשהוא תוך המלחמה מוכרח הוא להלחם ונק' מלחמות חובה ואז א"י לשבות היפ"ת
And this is what Rashi means [when he comments] that this speaks of an optional war (milchemes ha'reshus), for when a person is in the midst of the war he is compelled to fight, and that is called an obligatory war (milchemes chovah), and at such a time he is unable to capture the woman of beautiful form (yefas to'ar).
Rashi notes the Torah speaks of an optional war, because in an obligatory war one is forced into the fight and lacks the inner freedom to extract and elevate the captive sparks of holiness.
רק כשהוא בן חורין ורק מלחמות ה' נלחם אז יכול לשבות ניצוצי קדושה ע"י המלחמה
Only when he is a free man and wages purely the wars of Hashem can he then capture the sparks of kedushah by means of the war.
Only a free man who fights solely for the sake of Hashem can reclaim the sparks of kedushah hidden within the struggle.
ואעפ"כ כיון שבא ע"י האויב צריך שמירה הרבה באלה העצות עד שתסיר שמלת שבי' הוא הלבוש שנתלבש מסט"א בהיות נשבה שם
And even so, since [the spark] comes to him by way of the enemy, he requires much vigilance through these counsels until he removes the garment of captivity ("and she shall remove the raiment of her captivity"), which is the garment that the Sitra Achra clothed itself in while it was held captive there.
Because the spark arrives through the enemy, it still requires great care and the Torah's prescribed steps to strip away the husk of the Sitra Achra that had enclothed it during its captivity.
ודבר זה נוהג בכל איש ישראל שבוודאי ע"י מלחמות התאוות מרויח האדם וזוכה להשגה
And this matter applies to every single Jew of Bnei Yisrael, for surely through the wars against one's desires a person gains and merits to attainment.
This avodah belongs to every Jew, for it is precisely through battling one's desires that a person earns true spiritual gain and lofty attainment.
עכ"ז כיון שבא ע"י היצה"ר צריך שמירה ובירור הרבה פעמים עד שיזכה לעלי' שלימה אל הבורא ית':
Even so, since it comes by way of the yetzer hara, he requires guarding and much refining time and again, until he merits a complete ascent to the Creator, may He be blessed.
Yet because that gain comes by way of the yetzer hara, it demands repeated guarding and refining until one rises in a complete ascent to the Creator.
Summary: The Sfas Emes reads 'When you go out to war against your enemies' as the inner avodah of every Jew of Bnei Yisrael. Drawing on Rashi that the Torah speaks of an optional war, he explains that only a person who stands as a free man and fights purely for the wars of Hashem can extract the sparks of kedushah hidden within the struggle, since in a forced, obligatory war one lacks the freedom to capture them. Yet because these sparks come by way of the enemy, the captive yefas to'ar must first remove the garment of captivity, the very husk that the Sitra Achra clothed itself in. So too with every person who battles his desires: real spiritual gain and attainment come precisely through this war. But since that gain arrives by way of the yetzer hara, it demands repeated guarding and refining until one merits a complete ascent to the Creator, may He be blessed.