Still, even a closely fought defeat for Mr. Lamb would be a kind of victory, raising his profile for another run in November.

He recently got good news from the Pennsylvania Supreme Court, which redrew the state’s congressional district map to replace one gerrymandered heavily to favor Republicans. For the November election, Mr. Lamb’s hometown, Mt. Lebanon, will be in the newly drawn 17th District, where votes cast for the two parties have divided much more equally than they have in the current 18th District. Republican leaders are seeking to block the new map in federal court.

In conversations with voters, the failure of politicians to keep their promises was a common theme, enveloping the White House, Congress and the reason for the special election in the first place. Tim Murphy, an anti-abortion Republican, resigned from the seat last year after a mistress claimed he urged her to “abort our unborn child,” according to a text obtained by The Pittsburgh Post-Gazette.

“People say they’re conservative, and then it turns out things aren’t what they say once they get into office,” complained Tom Moore, 38, a Republican who works in a water treatment plant in the district.

Mr. Moore voted for Mr. Trump, but he judged the president’s first year in office as merely fair, saying that even with full Republican control in Washington, not much had been done. “The turnover has happened, but nothing has changed,” he said. He is undecided in the congressional race.

Ms. Stroud, the wife of the laid-off steelworker, who died in a car accident last year, said by telephone on Thursday that Mr. Trump’s announcement of tariffs to protect the American steel industry had not changed her mind about either the president or the congressional race. “I still want to see Conor Lamb win,” she said. “I think Saccone would be one of Trump’s henchmen, and I don’t trust him.”