Formal and elevated, used in eulogies, war memorials, and state media. The fixed phrase
为国捐躯 (wèi guó juānqū, 'to give one's life for the country') is the canonical context. Everyday word for dying is
死 (sǐ); for soldiers killed in action use
牺牲 (xīshēng).