WASHINGTON — President Trump’s mood went from feisty to self-pitying to deflated on Wednesday as he fended off questions about a July phone call in which he urged the president of Ukraine to work with Attorney General William P. Barr on potential corruption investigations connected to former Vice President Joseph R. Biden Jr., a Democratic rival.

Although Mr. Trump sought to present a business-as-usual image in his annual trip to New York for the United Nations General Assembly — by highlighting a trade deal with Japan, among other things — his anger and anxiousness took over his day, aides said. He appeared aggrieved in comments to reporters ahead of a meeting with the Ukrainian president, Volodymyr Zelensky, but by late afternoon, Mr. Trump appeared so exhausted that he spoke unusually slowly at a rambling news conference meant to sum up his trip at the United Nations.

He opened by naming 28 countries whose leaders he had met with and said that, unfortunately, reporters were far more interested in his phone call with Mr. Zelensky. “I’ve been up from early in the morning until late in the evening and meeting with different countries, all for the good of our country,” Mr. Trump said. “And the press doesn’t even cover all of this.”

Then he moved on to the call, and the words he said spoke to the Ukrainian president.

“They were perfect,” Mr. Trump said. “They were all perfect.”