With his soldiers fighting in snowy trenches and his country’s cities under attack from Russian missiles, President Volodymyr Zelensky returned to Ukraine on Friday from a flurry of diplomatic meetings still hoping for major aid packages from the United States and European Union to sustain the war effort.

The latest blow came early Friday when European Union leaders in Brussels conceded they would not be able to pass a multiyear, 50-billion euro, or about $54.5 billion, aid package over the objections of Hungary.

There was one glimmer of good news in an otherwise glum week for Ukraine when the European Union agreed on Thursday to open negotiations for Ukraine to join the bloc, following through on pledges made soon after Russia’s invasion last year.

“This is a very good morale boost now for Ukrainian people because we really need it with all that’s going on at the frontline, with all that’s going on in the U.S.,” said Oleksiy Honcharenko, a member of the Ukrainian Parliament, referring to Ukraine’s stalled counteroffensive and the political infighting in Congress that is blocking further military aid to Ukraine.

“This is a truly remarkable result for Ukraine and for the whole of Europe,” Mr. Zelensky said in his overnight address on Friday. “Many people in Ukraine are now in high spirits, and this is important, this is motivation.”

Many residents of Kyiv, the Ukrainian capital, echoed Mr. Zelensky’s optimism.

“I feel elated today,” Oleksander Baldiniuk, 43, said Friday morning as he stood near the Golden Gate, a reconstructed gateway that marked the entrance to the city in medieval times. “This war is also a psychological war, and this is good for our mood.”

Asked about his reaction, one Kyiv resident, hurrying to work, snapped: “A Christmas gift!”

Still, talks to join the European Union will stretch years, and Ukraine faces urgent challenges now. It relies on foreign aid for about half of its federal budget and most of the ammunition and weaponry sustaining its army. The E.U. failure to approve more aid follows a disappointing trip by Mr. Zelensky to Washington, where he did not succeed in gaining a commitment from Republican lawmakers for more assistance.

Key decisions on aid next year by the United States and European Union, Kyiv’s two largest military and financial backers, may now be pushed back until January.

“They could give us more help right now, but somehow they don’t,” said Svetlana Vasylik, a 29-year-old event manager, noting that opening accession talks with the European Union would not result in concrete changes in the short term. She said that her father, who is fighting on the frontline, told her his unit was constantly lacking ammunition.

Ukrainian officials have warned that delays would embolden Russia and raise risks of costly setbacks. That has been a recurring theme from Kyiv since the early stages of the war, including when they were urging Western allies to provide heavy and rocket artillery last year and tanks this year.

In the absence of substantive new commitments, Mr. Zelensky has highlighted the E.U. decision on joining the bloc and the aid pledged from individual countries.

“I return to Ukraine, I am now in Lviv, with a decision from the European Union and other things that will strengthen our air defenses,” Mr. Zelensky said in a video address filmed on a snowy street.

After leaving Washington empty-handed, Mr. Zelensky attended a summit of Nordic leaders and received pledges of about $1 billion in military aid from Denmark and new assistance from Norway. Mr. Zelensky said Finland, Sweden and Spain were preparing new aid. On Wednesday, the German chancellor, Olaf Scholz, pledged to double assistance to nearly $9 billion next year.

Regarding the opening of E.U. accession talks, Mr. Zelensky said the step was “one more political artillery shell that will bring victory closer.”

He said he expected the U.S. Congress to soon “make the necessary decision” on a $64 billion military and financial assistance package. Republicans have said they will not approve the aid without a compromise from Democrats on immigration policies and security on the southern U.S. border.

Shorter delays will not cripple Ukraine’s finances and military. Funding remains at the Pentagon to transfer weaponry into the new year, and previously approved military assistance is arriving. Still, artillery crews along the southeastern front have said they must ration shells.

Kateryna Zarembo, an associate fellow at the Kyiv-based New Europe Center, said she was confident that the European bloc’s leaders — who are set to reconvene early next month to try to reach unanimous agreement on the €54.5 billion aid package — would eventually send the funds to Ukraine. “Personally, I would not worry too much about this,” she said.

Maintaining air defense capabilities is pivotal for Ukraine’s military and economy, to thwart near nightly Russian missile and drone attacks that can hobble the army’s logistics and plunge cities into blackouts. Through the week as Congress and European Union leaders considered aid, Russia fired multiple volleys of exploding drones, cruise and ballistic missiles.

Falling debris from missiles intercepted by Ukraine’s Western-provided air defenses over Kyiv wounded dozens of people on Wednesday.