In the days after the Senate confirmed Judge Brett Kavanaugh to the Supreme Court, a wave of optimism washed over Donald Trump’s West Wing. White House aides were buoyed by internal polling conducted by former Trump campaign pollster Tony Fabrizio indicating that Republicans could conceivably hold both the Senate and the House in the forthcoming midterm elections, according to a person briefed on the data. “Trump’s mood was great,” a former West Wing official who spoke with him told me.

But as next Tuesday’s voting approaches, the mood inside the West Wing has darkened. The arrest of Trump supporter Cesar Sayoc for allegedly sending more than a dozen pipe bombs to the president’s political enemies, in addition to a horrific mass shooting at a Pittsburgh synagogue by an avowed white nationalist, completely upended the dynamic. As The New York Times’s Peter Baker recently noted, Trump has been frustrated by his own inability to control the news cycle. Meanwhile, Fabrizio has leveled with the president’s advisers that Democrats will take the House, the source briefed on the polling told me. Trump has responded to this worsening political environment with extreme frustration. “He was really upset the momentum had been killed by the pipe bombs,” one Republican close to the White House told me. Another former White House official in touch with colleagues said that Trump’s mood has been grim. “The president is self-destructing,” the official said.

To forestall electoral disaster on Tuesday, advisers have been debating strategies for regaining momentum. One idea being discussed, according to a Republican briefed on the conversation, would be for Trump to deliver a prime-time Oval Office address on the topic of “unity.” Trump, however, shot down the notion and instead is lurching in the other direction: turning out his die-hard base with hard-core anti-media and anti-immigration rhetoric. The base messaging strategy is being driven by White House Deputy Chief of Staff Bill Shine and outside advisers Corey Lewandowski and Dave Bossie, a person familiar with the situation told me. Bossie and Lewandowski did not respond to requests for comment.

Trump has followed their advice by ramping up his “enemy of the people”-style attacks on the media, and whipping up right-wing hysteria about the migrant caravan slowly wending its way through Mexico to the U.S. border. “That’s why he sent [more than] 5,000 troops down there. It’s obviously political,” an outside adviser said. This week, Trump told Axios’s Jonathan Swan that he’s considering ending birthright citizenship by executive order, a dubious maneuver that legal experts from both parties—including Kellyanne Conway’s own husband, George Conway—have reiterated would be rendered unconstitutional. “All of this feels like Hail Mary passes—throw red meat to drive turnout,” a former West Wing official said. “In a way, the Kavanaugh bump peaked too early.”

There was always bound to be West Wing turnover after the midterms, but the increasing likelihood that Democrats will take the House—and with it, usher in an era of perpetual investigations and hearings—could drive more senior officials to the exits. “There’s going to be a lot of departures,” the former West Wing official said. Earlier this week, a rumor swirled through Washington that Conway could be leaving, fueled in part by her husband’s op-ed about the unconstitutionality of ending birthright citizenship and Conway’s own removal of her White House title from her Twitter bio. (A person close to Conway called the speculation “silly.”) Treasury Secretary Steven Mnuchin is also said to be looking for an off-ramp, a former West Wing official said. According to the source, Mnuchin is getting pressure from his wife, Louise Linton, who has been unhappy about her coverage in the media. “She’s been poorly treated in Washington and she’s like, ‘I want the fuck out,’” the source said. (Through a Treasury spokesperson, Mnuchin said, “That is a ridiculous comment.”) Already, there have been discussions about who would replace Mnuchin. Trump is said to like Jonathan Gray, who was recently elevated to president and C.O.O. of the private-equity behemoth Blackstone, and appears to be the heir apparent to Stephen Schwarzman. The White House did not respond to a request for comment.

The fate of Chief of Staff John Kelly is still the longest-running West Wing subplot. While many Trump advisers have expected Kelly to leave after the midterms, there’s a growing sense among others I spoke with that Kelly’s position is secure. Ivanka Trump recently told a friend that her father won’t fire Kelly, a source familiar with the conversation said. And on a phone call with a former West Wing official earlier this month, Trump said he worried that Kelly would campaign against him if he was fired. Bill Shine recently told a friend, “This guy isn’t going anywhere.”