WASHINGTON — President Trump claimed credit for a “great American comeback” in a speech to Congress on Tuesday night, boasting of a robust economy, contrasting his successes with the records of his predecessors and projecting optimism in the face of a monthslong Democratic effort to force him from office.

Mr. Trump, who lamented what he called “American carnage” when he was inaugurated in January 2017, described a different country today, declaring in his third State of the Union address that the nation’s future was once again “blazing bright.”

“In just three short years, we have shattered the mentality of American Decline and we have rejected the downsizing of America’s destiny,” Mr. Trump said in a speech that lasted 78 minutes. “We have totally rejected the downsizing. We are moving forward at a pace that was unimaginable just a short time ago, and we are never, ever going back!”

“The state of our union,” Mr. Trump declared, “is stronger than ever before.”

Welcomed by enthusiastic applause from Republican lawmakers, the president marched confidently into the same historic chamber where he was impeached 49 days earlier. Mr. Trump described the nation as enjoying what he called a “blue-collar boom,” fueled by trade agreements and his success in “restoring our nation’s manufacturing might.”