WASHINGTON — President Trump will visit Dayton, Ohio, and El Paso on Wednesday in an attempt to deliver a message of national unity and healing to two cities scarred by mass shootings over the weekend and where many grieving residents hold him responsible for inflaming the country’s racial divisions.

The president stands accused of embracing hateful rhetoric and dodging calls for gun control, prompting divided feelings in both places about whether his arrival will provide comfort or incite rancor. Mr. Trump is scheduled to arrive in Ohio in the morning before traveling on to Texas in the afternoon.

The Democratic mayor of Dayton, Nan Whaley, said on Tuesday that she had been “disappointed” with Mr. Trump’s remarks the day before about the two massacres, which left a combined 31 people dead. In a brief speech, Mr. Trump denounced white nationalism and called for more action to address mental illness and to combat online hate, but endorsed only minimal new gun control measures.

[What is the paranoid ideology that is fueling America’s crisis of white supremacist violence?]

Still, Ms. Whaley said, she would respectfully welcome the nation’s elected leader to her city.