Love your neighbor gets you halfway there. This means you deeply recognize and identify with the humanity in every person. We are, in essence, all very much the same at the deepest level.
But in attitudes and day to day behavior, well often “hell is other people.”
So, add a little Marcus Aurilius to Jesus, and stand above the pettiness and cruelty that others can mete out. Then you can be you, be nice and not get hurt.