Nearly two years after his inauguration, I have concluded that President Trump has made me a better person.

For starters, I’m more compassionate. After the election, I was as dazed and confused as anyone in the political-media bubble. To understand what happened, I devoured reporting about Trump voters and sought to understand them.

I wasn’t some liberal, mind you. I had worked for years in Republican politics. Yet I hadn’t known any Trump primary voters. I didn’t know his fans, his base.

Reading their concerns was eye-opening. They weren’t stupid, and they weren’t hateful. Mainstream politicians had ignored them for so long that they took a wild chance on the reality-TV star from Queens.

At the same time, because I wasn’t a Trump voter, I understood the pain of people frightened by his win. Caring about his voters didn’t preclude caring about his ­opponents, I found.

I talked down friends who thought America was over because of his presidency. I exulted in our institutions and checks and balances, and I defended them when they were attacked by Trump — or his adversaries.

America seemed more divided than ever, but being scared of change is a human emotion that we all share. And whatever you think of Trump, he represented a massive change from the status quo ante.

That change has transformed me in another way, as well. To wit, Trump has made me less partisan. I’ve disagreed with plenty of policies of Republican presidents in the past, but I still always felt the need to ­defend GOP administrations; they were on “my team.”

The beauty, and the curse, of the Trump administration is that the man at the top is on his own team. I can see clearly the good and the bad that his office produces, and there is no need to sugarcoat any of it. Tax cut, good. Tariffs, bad. I can praise the first, criticize the second and stay true to my own beliefs.

His presidency also helped me refine which issues truly matter to me and which only appeared to matter because “my party” happened to be pushing them.

I remember caring deeply about President George W. Bush’s effort to partially privatize Social Security. But when the ­issue faded away, it barely left an imprint on my mind. No longer tied to a political personality or party, my main issues now remain fairly consistent.

Then, too, the mainstream media were largely on a break from history during the eight years of President Barack Obama’s tenure, and it has been gratifying watching them catch up. So many stories about the outrages of the Trump administration are immediately followed by stories of how, actually, “Obama did this, too.”

This made me face my own hypocrisy. When the story broke that Trump was separating migrant children from their parents at the border, I was heartbroken and disgusted. But the follow-up reports, about how the Obama administration took similar action, were even harder to stomach.

Where was I? Where were any of us?

As Franco Ordoñez and Anita Kumar ­reported for McClatchy in June, when it comes to illegal immigration, the two administrations mainly differ over rhetoric.

According to Ordoñez and Kumar, the Obama administration separated children from their parents, built more and larger facilities that have since been criticized and took other controversial steps, “including fighting to block efforts to require ­unaccompanied children to have legal representation.”

That this went ignored is shameful, and it has impelled me to be more vigilant going forward.

I have also resisted the siren call of “Trump does it, so it makes it OK.” As I have written in these pages, Trump’s name-calling has made me check my own ­impulse to let insults fly.

Trump being a mirror for my conduct was clarifying. It didn’t make any sense for me to criticize the president for behavior that I engaged in. Yet so many people lean into the Trumpian way as a way of . . . countering Trump.

There must be a way to move beyond Trump and our culture’s ugliness, which transcends one presidency. Americans can resolve to be better people, instead of racing to the bottom. We won’t always have Trump to blame for our bad behavior. It might be best to start improving it now.