Plus, as the philosopher Amartya Sen has argued, this mentality makes the world more flammable. Crude tribal dividing lines inevitably arouse a besieged, victimized us/them mentality. This mentality assumes that the relations between groups are zero sum and antagonistic. People with this mentality tolerate dishonesty, misogyny and terrorism on their own side because all morality lays down before the tribal imperative.

The only way out of this mess is to continually remind ourselves that each human is a conglomeration of identities: ethnic, racial, professional, geographic, religious and so on. Even each identity itself is not one thing but a tradition of debate about the meaning of that identity. Furthermore, the dignity of each person is not found in the racial or ethnic category that each has inherited, but in the moral commitments that each individual has chosen and lived out.

Getting out of this mess also means accepting the limits of social science. The judgments of actual voters are better captured in the narratives of journalism and historical analysis than in the brutalizing correlations of big data.

Rebinding the nation means finding shared identities, not just contrasting ones. If we want to improve race relations, it’s not enough to have a conversation about race. We also have to emphasize identities people have in common across the color line. If you can engage different people together as Marines or teachers, then you will have built an empathetic relationship, and people can learn one another’s racial experiences naturally.

Finally, we have to revive the American identity. For much of the 20th century, America had a rough consensus about the American idea. Historians congregated around a common narrative. People put great stock in civic rituals like the pledge. But that consensus is now in tatters, stretched by globalization, increasing diversity as well as failures of civic education.

Now many Americans don’t recognize one another or their country. The line I heard most on election night was, “This is not my America.” We will have to construct a new national idea that binds and embraces all our particular identities.

The good news, as my Times colleague April Lawson points out, is that there wasn’t mass violence last week. That could have happened amid a civic clash this ugly and passionate. That’s a sign that for all the fear and anger of this season, there’s still mutual attachment among us, something to build on.

But there has to be a rejection of single-identity thinking and a continual embrace of the reality that each of us is a mansion with many rooms.