Fátima Nobre, 57, an advertising executive, said a neighbor threw her out of his apartment during lunch a few weeks ago when she expressed support for Ms. Rousseff’s impeachment. “It was as if he was channeling Dilma’s spirit, like he had turned into the devil,” she said, referring to the president by her first name. “I don’t want to be friends with a person like that.”

The most searing rancor often finds expression on Facebook, where Brazilians’ postings about pets and food have been almost entirely supplanted by political shouting matches.

Andressa Umeki, 34, a journalist, said a verbal imbroglio on Facebook ended her relationship with a cousin who used to shower her with words of affection. After Ms. Umeki publicly cast her lot with the opposition seeking impeachment, the cousin unfriended her. “We used to speak by phone but not anymore,” she added.

Alarmed by the surge in social strife, some Brazilians have taken a hard line on political chatter. Tarciano André Barbosa, 40, a tech analyst in São Paulo, said he had to warn his father-in-law about cracking political jokes during his daughter’s recent birthday party.

“You see people on TV in the Middle East throwing bombs at one another, and here we are fighting, too, though in a different way,” he said. “People have become so extremist. It’s absurd, and in the end this will pass, but relationships can’t be lost over ignorance.”

Though it sometimes feels as if all of Brazilian society is consumed by the machinations taking place in Brasília, those who study the growing polarization say much of the fury is confined to older, middle-class professionals.

Pablo Ortellado, a professor at the University of São Paulo who studies protest movements in Brazil, said a recent survey he conducted showed that working-class Brazilians and people under 35 had largely stayed away from the political rallies that were roiling many cities. “Even I was surprised by the results because it sometimes seems that these protests are affecting all of society,” he said.