WASHINGTON—Faced with the prospect of impeachment, President Trump and his re-election campaign expressed confidence the effort to boot him from office would give an unlikely boost to his bid for a second term.

Mr. Trump’s strategy to convert his latest controversy into a political advantage has been to take the unprecedented step of declassifying—and releasing—a document detailing a private discussion with a foreign leader, corralling Republican allies to coordinate his defense and blasting out urgent fundraising emails and...