WASHINGTON — The House voted on Thursday to temporarily eliminate a tax increase on some high-earning residents of states like California and New York that was included in President Trump’s 2017 tax overhaul, with some Republicans joining Democrats in support.

The bill would repeal a cap on a popular tax break that prevented taxpayers from deducting more than $10,000 in state and local taxes from their federal income taxes. It paired that repeal — which would in effect be a tax cut for upper earners in high-tax states — with an increase on the highest earners across the country by raising the top income tax rate to 39.6 percent from 37 percent.

In a procedural twist, Democrats agreed to a Republican amendment that would limit the bill’s benefits for blue-state billionaires. It would maintain the so-called SALT cap on deductions for taxpayers earning more than $100 million per year, and direct the saved money to a $500 tax break for teachers and first responders. Representative Mike Thompson, Democrat of California, said the motion was accepted “in the spirit of the holiday season.”

The bill, which was approved by a vote of 218 to 206, has no chance of passing the Republican-controlled Senate, and Mr. Trump has threatened to veto it.