He committed suicide in the Presidential Palace, so that technically doesn't count.
'Committing suicide' during a CIA backed coup that installed a military dictatorship. Yeah. Not suspicious
at all. It should definitely count as a death in battle.
Could Napoleon I dying in battle count? Or is that too early for "industrialized era"?
Slightly too early, since the only country that could realistically be considered as industrialized during the Napoleonic Wars was the UK, and even then only barely. Different story by 1830 however, as the Industrial Revolution was hitting its strides by then.
As for a Head of State and/or Government dying in battle, then WW2 offers enormous potential, since both aerial and submarine warfare was widespread. Any leader on either side ran the risk of being bombed, shot down in transit, or killed visiting the front on a inspection/morale-boosting trip, especially in the European/Mediterranean theatres. Yamamoto, a former government minister, was shot down over the northern Solomon Islands. FDR was almost killed by one of his own escort ships, the infamous
USS William D. Porter, while he was aboard the
USS Iowa. So, it wouldn't be too hard to have any of them killed in a combat scenario.
Then there is the Polish-Soviet War, the Spanish Civil War, and China during any of its revolutions, rebellions & civil wars post 1850.