The nightmare of impeachment has to end. The cure to the political night sweats of the past five months is an election that will soon be upon us — not weeks more of pointless, dreary testimony about a convoluted case.

The House Democrats achieved all they were going to achieve in December when they satiated their base with this baseless impeachment. Since then, the supposed bombshells, from John Bolton to Lev Parnas (remember him?), have failed to explode.

President Trump isn’t going to be removed from office, which is supposedly the purpose of this whole enterprise. There are at present essentially two opinions among the Republicans who control the Senate.

The majority believes that the president acted under his legitimate authority in delaying aid to Ukraine and, as the White House counsel argues, did nothing wrong. A small number of GOP senators who lean squishy (or in some cases are politically vulnerable) seem more comfortable arguing that Trump acted inappropriately, but even they don’t believe he committed a removable offense.

But at the end of the day, it just doesn’t matter. In his presentation making the constitutional case for the president, Harvard Law School professor Alan Dershowitz gave Trump-skeptical Republicans all the reasons they need to put this trial to bed: Even if President Trump did everything he is accused of, he argued, then it still does not rise to the level of a removable offense.

Let some Republicans defend the “perfection” of the phone call between Trump and his Ukrainian counterparts. Let other GOP senators bemoan Trump’s actions but conclude that they don’t meet the standard for removal. But for the love of mercy, just end this already.

Of course, Democrats argue we must now hear from former National Security Adviser John Bolton. But why? He wrote a book, a book we will all be able to read in March. If, as Democrats hope, Bolton’s claims sink the White House’s defensive battleship, we will all know it.

Then, just a few months later, American voters, who according to polls have had their opinion encased in amber since last fall, can render their judgment at the ballot box.

Democrats want to keep the nation in the purgatory of endless, pointless witness interviews. But they should keep in mind that Republicans invite witnesses to purgatory, too. Hunter Biden, Joe Biden, Adam Schiff, the whistleblower.

By putting this process out of its misery, the Senate will allow for the normal functioning of our democratic system and place power in the hands of the people, where it belongs. This applies not only to the president, who should be judged by the voters, but also a Democratic primary diminished by having three of its leading contenders sitting in silence enduring the congressional equivalent of Chinese water torture.

A more world-historical reason for shutting this thing down: Three of our last nine presidents have faced impeachment, while only one of the previous 36 did. This is an unacceptable new normal, and Senate Republicans should send a clear message to future Congresses that cynical partisan impeachment will be thwarted. Perhaps even a few courageous Democrats can join them.

Ending the doomed but deeply undemocratic effort to remove a duly elected president of the United States is the best way for the country to move forward — whether the result of the November election is a repudiation of Trump or a ticket to a second term.

Americans are exhausted with this nonsense. And there are actual problems that need to be dealt with: tensions with the Iranian ­regime, trade deals, a revived Israeli-Palestinian peace process and, yes, a presidential election.

The Senate should take pity on the country and itself by moving on. As Democrats like to point out, Trump is “forever” impeached; the voters will decide who wins the next election; history will judge whether this impeachment was worthy and warranted or a partisan witch hunt. But for now, just, please, make it stop.

David Marcus is The Federalist’s New York correspondent. Twitter: @BlueBoxDave