Among the dozens of registered candidates, broad name recognition and a populist proposal to cut natural gas prices propelled Yulia V. Tymoshenko, a former prime minister, into the top tier of contenders.

Younger voters and those disillusioned with traditional politicians have channeled their anger into supporting the quirky, social media-based campaign of Volodymyr Zelensky, a comedian without political experience who plays the president in a popular television show.

Mr. Zelensky has appealed to eastern voters by speaking Russian in public and on his television show. But, paradoxically, Russia’s military intervention five years ago has weakened the pro-Russian bloc in Ukrainian politics. Russian-leaning politicians lost millions of voters to Russia’s annexation of Crimea and support for eastern separatism.

For Mr. Poroshenko, whose backing mostly comes in the west, a deep recession eroded support for the post-revolution government.

Mihailo Strashok, 72, relies on a food bank to supplement his meager pension and takes a glum view of the government’s calls for support and for sacrifice in a time of war.

“We won’t sacrifice our bodies and souls” he said, “for these bandits in power.”