CASTROVILLE, Tex. — In the three years since Donald J. Trump began his presidential bid by maligning Mexican immigrants, Representative Will Hurd, a Texas Republican in a Democratic-leaning district, has faced voters of all stripes who were angry about Mr. Trump’s divisive style.

But Mr. Hurd, who represents a heavily Hispanic region that stretches across 800 miles of the Mexican border, could not recall a moment when people were as appalled as they were over the images of anguished children separated from their migrant parents.

“All the calls and emails I’ve gotten in my office are from constituents saying: ‘Why are we doing this, this is against our values,’” Mr. Hurd said. The president’s policy had damaged the Republican brand, he said, because “nobody understands why you would take children out of their parents’ hands.”

Yet many rank-and-file Republican voters in border states see it differently, creating another kind of pressure for lawmakers like Mr. Hurd. Whatever sympathy these voters feel for the children is complicated, they say, by their intense frustration over the flow of migrants from Mexico.