“Don’t believe stories and don’t believe polls,” the president said, “because the polls are worse than the stories.”

Mr. Trump spent a substantial amount of time regaling the crowd with stories of his 2016 campaign, calling Dan Scavino — his social media manager and “the most powerful man in politics,” the president said — up to the stage to hand him a stack of news clippings. The president read aloud from them individually, insulting journalists who had declared he had done poorly on the debate stage against Hillary Clinton, his Democratic opponent that year, and attacking Fox News personalities he considers too critical of him.

“I did great in the debates,” Mr. Trump said. “I became president because of the debates.”

At the Colorado rally, he was expected to try to bolster the fortunes of Senator Cory Gardner, a vulnerable Republican up for re-election in a state that is trending increasingly liberal. “You’re going to help get Cory Gardner across that line because he’s been with us 100 percent,” he told the crowd.

Democrats have pointed out that the president’s track record on lending support to embattled candidates is mixed at best. But Mr. Trump is practiced at trying to turn any anti-Trump words spoken by Democrats against them, as he did when he paid particular attention to remarks that Mr. Bloomberg delivered to supporters on Thursday morning at an event in Salt Lake City.

“Look, the real winner in the debate last night was Donald Trump because I worry that we may be on the way to nominating somebody who cannot win in November,” Mr. Bloomberg said. “If we choose a candidate who appeals to a small base, like Senator Sanders, it will be a fatal error.”

Mr. Bloomberg’s somewhat chastened reaction was the cherry on top for the president, who has spent most of the week drawing energy — and money — from enthusiastic supporters. According to a Trump campaign official, Mr. Trump has raised $17 million for his re-election efforts since arriving on the West Coast.

“America likes winners, not whiners,” Kellyanne Conway, a counselor to the president and a former Trump campaign manager, said of his post-debate confidence. “President Trump has survived every petty, partisan, pathetic attempt to remove him from office and is well positioned to do it one more time: on Election Day.”