President Donald Trump called the results of Tuesday’s midterm elections a “success.” And they were, in some ways.

Republicans picked up seats in the Senate and saved several governorships, thanks in part to the president’s campaigning.

And Trump may be right that a House of Representatives with a narrow Democratic majority might allow him to accomplish more than he would have with a narrow, Republican majority vulnerable to spoilers.

But despite his optimism, the fact is that Tuesday was also a failure: Trump and the Republicans should have held the House.

Yes, the president’s party loses an average of about 30 seats in midterm elections.

But this presidency, by its own estimation, is hardly an average one. The economy has never been so good heading into a midterm election. Moreover, the map favored Republicans because it was largely drawn by Republicans after the Tea Party wave election of 2010.

Republican National Committee (RNC) chair Ronna McDaniel took an ill-advised victory lap in an op-ed at Fox News on Thursday. “We staved off a blue wave thanks to the Republican National Committee’s (RNC) largest-ever ground game and record-setting fundraising, and President Trump’s energizing rallies for our candidates,” she said, citing “minimal losses.”

Nowhere in the entire op-ed did McDaniel acknowledge losing control of the U.S. House — and the agenda.

In the real world, the voters sent a clear rebuke to the president and his party.

The danger is that neither will hear it, because the message is being delivered by the media, who continue to discredit themselves with their hatred of Trump.

But the exit polls tell the story. Despite the strong economy, only 41% of voters believe the country is on the right track, while 56% — including 58% of independent voters — believe it is on the wrong track.

There are three basic reasons that Republicans lost the House:

1. The Republicans failed to honor their promise to repeal and replace Obamacare with a decent health insurance policy; 2. Americans feel that the country is divided and that the president is not doing enough to unite us; 3. Republican leaders failed to build lasting relationships with Trump voters in blue states, especially in the Upper Midwest.

On health care, Trump not only promised to repeal and replace Obamacare, but to ensure every American enjoyed health insurance coverage. Thus far, he has only managed to make small changes, such as repealing the individual mandate and expanding access to cheap short-term plans. Last year, he hinted at a an Australian-style system, where the government covers basic health care, and private insurance covers the rest. But he never introduced that plan.

That is not entirely his fault. The Republican leadership in Congress assured the president that they would handle health care. But they failed, though they owed their mandate to the rebellion against Obamacare. And the reason they failed was not because of John McCain. His “thumbs down” came during a vote on the “skinny repeal” of the individual mandate, not the broader policy; he later voted, less theatrically, to repeal the mandate in the tax cut bill.

The reason Republicans failed was their policy was bad. Policy experts loved it, but the American people did not trust it, because they were never convinced it would guarantee them the security of coverage at an affordable price.

Nor did Republican leaders undertake the political task of building a coalition of support for their new legislation. They didn’t care enough about their own idea to bother selling it. That sent a signal that they did not believe in it.

The Democrats’ unofficial alternative, “Medicare for All,” is a complete disaster. It has failed everywhere that it has been tried — including Vermont, the home state of Sen. Bernie Sanders (I-VT), who championed the idea. But the idea is appealing because Medicare, which guarantees Americans will not become destitute as we age, is so popular.

A bad idea beats no idea at all. Trump’s own idea was much better, but he never campaigned on it.

Trump campaigned on other issues, like immigration, which is very important to Republican voters. But he also devoted a great deal of time and energy to bitter fights.

Some, like the fight over football players kneeling for the national anthem, were worth having. Others, like the fight over the size of the crowd at the inauguration, were not.

Arguably, the Democrats and the media bear more of the blame for the decline in tone. But Trump — as he himself acknowledged — must do better.

The good news is that Trump can address health care and political divisions at once. Passing a bipartisan health care bill would allow Trump and the Republicans to show that they have compassion, and that they can work together with the opposition.

Democrats might prefer to deny Trump that victory — but if the president and the Senate set the right tone, they can leave the Democrats no alternative but to play along.

Fixing health care will help Trump show the blue-state voters who backed him in 2016 that he has delivered. Those voters are still there.

But he has to reach out to them. The GOP has spent very little effort building up the Trump coalition, losing ten of 12 blue districts Trump won in 2016 while Democrats won 18 of 25 red districts Hillary Clinton won. (Trump, like Hillary in 2016, ignored Michigan in 2018.)

McDaniel’s “happy talk” will not help. Trump and the Republicans should recognize they lost in 2018 — and make the necessary changes, now.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.