LOS LUNAS, N.M. — The tumultuous 2018 midterm campaign, shaped by conflicts over race and identity and punctuated by tragedy, barreled through its final weekend as voters prepared to deliver a verdict on the first half of President Trump’s term, with Republicans bracing for losses in the House and state capitals but hopeful they would prevail in Senate races in areas where Mr. Trump is popular.
The president was set to storm across two states Saturday, two Sunday and three Monday in an effort to pick off Senate seats in Indiana, Florida and a handful of other battlegrounds where Republicans hope to add to their one-seat majority in the chamber. Democrats and liberal activists, galvanized by opposition to Mr. Trump, gathered Saturday to knock on doors and make turnout calls from Pennsylvania to Illinois to Washington to try to erase the G.O.P.’s 23-seat House majority.
The run-up to the election, widely seen as a referendum on Mr. Trump’s divisive persona and hard-line policy agenda, has revealed deep strains in the president’s political coalition and left him confined to campaign in a narrow band of conservative communities. Republicans’ intermittent focus on favorable economic news, such as the Friday report showing strong job growth, has been overwhelmed by Mr. Trump’s message of racially incendiary nationalism.
While Mr. Trump retains a strong grip on many red states and working-class white voters, his jeremiads against immigrants and penchant for ridicule have proved destabilizing, with the party losing more affluent whites and moderates in metropolitan areas key to control of the House.
Republicans have grown increasingly pessimistic in recent days about holding the House, as polls show a number of incumbents lagging well below 50 percent and some facing unexpectedly close races in conservative-leaning districts.
In several diverse Sun Belt states where Republicans had shown resilience, such as Texas, Florida and Arizona, their candidates have seen their numbers dip in polling as Mr. Trump has given up the unifying role that American presidents have traditionally tried to play.
Democrats are also in contention to retain or capture governorships in rust belt states like Pennsylvania, Michigan and Wisconsin that were pivotal to Mr. Trump’s victory and fertile ground for Republicans for much of the last decade.
Despite these worrisome signs, some Republican leaders saw reason for measured optimism. While Mr. Trump said Friday that Republicans losing the House “could happen,” Representative Steve Stivers of Ohio, who leads the G.O.P. House campaign committee, has continued to predict that his party will narrowly hold its majority. Republican strategists have argued that about two dozen races are within the margin of error in polling; should right-of-center voters swing back to them on Election Day, they say, Democrats could fall short of winning enough seats to take control of the House.
Republican officials were more confident about their prospects in the Senate, where they had an opportunity to enlarge their majority in an otherwise difficult year. Nearly all of the most important Senate races are being fought on solidly conservative terrain, including North Dakota, Missouri and Indiana, where Democratic incumbents are in close contests for re-election. Mr. Trump won all three states by landslide margins in 2016.
There was an unmistakable dissonance between the relative health of the economy and the dark mood of a country as voters prepared to go to the polls just days after a wave of attempted mail bombings and a massacre at a Pittsburgh synagogue that left 11 dead.
“The nation is in political turmoil,” said Representative Carlos Curbelo, a Florida Republican facing a difficult re-election in part because of Mr. Trump’s unpopularity. “The economy is roaring but the mood is so sour. It’s a very sad time in this country.”
The mood that has imperiled lawmakers like Mr. Curbelo has buoyed Democrats across the country. A class of first-time candidates has been lifted by an enormous surge of activism and political energy on the left, as a loose array of constituencies offended by Mr. Trump — including women, young people and voters of color — has mobilized with a force unseen in recent midterm elections.
Early voting across the country reflected the intensity of the election: More than 28 million people had already cast ballots by the end of Friday, about 10 million more than at a comparable point in the 2014 midterm elections, according to the Democratic data firm Catalist.
If Mr. Trump has animated a powerful national campaign against him, Democratic candidates have largely avoided engaging the president personally in the closing days of the election, instead hewing close to a few favored issues like health care.
At a Saturday morning rally, Representative Ben Ray Luján of New Mexico, the head of the Democrats’ campaign committee in the House, drummed home the party’s ethos of ignoring Mr. Trump while riding the backlash against him.
“We don’t really have to even talk about this president — he’s going to do all the talking about himself, for himself,” Mr. Luján said, addressing volunteers in Los Lunas, where Democrats are making a push to pick up an open House seat. “I want you to concentrate on families here in New Mexico.”
But Senator Martin Henrich, appearing beside Mr. Luján and Xochitl Torres Small, a water-use lawyer who is the Democratic nominee for Congress, cast the election in dire terms familiar to anxious Democrats across the country. “This is a battle for who we are as a nation,” said Mr. Heinrich, who is expected to win re-election easily on Tuesday.
That mind-set on the left has given Democrats an upper hand in campaign fund-raising. Political spending in the election is expected to exceed $5 billion, making it the most costly midterm contest in history, according to a report by the Center for Responsive Politics. The report found that Democratic candidates for the House had raised more money than their Republican competitors, by a margin of more than $300 million.