For several days in March 2022, the battalion of Yaryna Chornohuz, a Ukrainian poet and combat medic, faced fierce attacks from a column of Russian tanks in southeastern Ukraine. Outgunned, the soldiers repelled the first two assaults, but suffered many casualties.

As Ms. Chornohuz bandaged the head of a wounded platoon commander, she said a third attack broke through, forcing the Ukrainian troops to retreat quickly, leaving behind the commander and other badly injured soldiers.

“Lots of good guys were killed,” said Ms. Chornohuz, 29. “We didn’t have the time to say goodbye to any of them.”

After she reached safety in a village away from the combat zone, she poured her emotions into a poem, typing out verses on her phone.

Every time you want to be wrong

About the brightness of those eyes

The eyes of those who decided one day

To die in battle

Are always brighter than others’