Elvis said, “When things go wrong, don’t go with them.”

Depression warps one’s thinking. It saps energy and magnifies problems, making it hard to deal with them calmly. Democrats’ overreaction to the recent loss in a Georgia special election bore all the trademarks of depression.

“Why Do Democrats Keep Losing in 2017?” was among the self-flagellating headlines, this one in The Atlantic.

Democrats badly need a little cognitive therapy to challenge negative patterns of thought. So they lost special elections in South Carolina, Kansas, Georgia and Montana. These were all conservative strongholds. Suppose Republicans had just failed to win in California, Massachusetts, New York and Washington. Would anyone have deemed such outcomes an omen of doom?

“Catastrophizing” is the shrink’s term for treating ordinary setbacks as catastrophes. Depressed people get trapped in a negative feedback loop: “I’m no good. Why even try? I lose. I’m no good.”

Democrats need to break that loop. Sure, it would have been nice had Democrat Jon Ossoff won the special election in Georgia’s 6th Congressional District. The reality is he lost by less than 4 points in a district that a mere seven months before had given the Republican a 23-point win.

Ossoff was a 30-year-old political novice who, unfortunately, lived just outside the district. He put up a really good fight, but imagine what a seasoned politician with a deep drawl could have done.

Democrats set themselves up for heartbreak when they made this vote the be-all and end-all event that would break the curse of Donald Trump. National Democrats poured millions into the race, a factor that may have annoyed wavering locals. It may also have energized the Trump base.

Whatever, putting all their chips on one race and declaring in advance that a win would change everything made Democrats mentally unprepared for even a small loss. But their situation is far from hopeless.

Come the midterms, Democrats will be running in dozens of other suburban districts that are more competitive. They must work these contests with a cool resolve, not desperation.

After all, many suburbs once deemed reliably Republican have gone blue. Trump failed to get 50 percent of the suburban vote. Atlanta’s Cobb County and Orange County in California used to be the quintessence of Republican country. Trump lost in both of them.

And the suburban threat for Republicans goes beyond Trump and his unique brand of offensiveness. Neither the gentlemanly Mitt Romney in 2012 nor the mainstream John McCain in 2008 could clear the 50 percent hurdle in the suburbs.

Democrats in a funk must identify the half-full glasses, starting with the fact that Trump would not be president but for an electoral fluke. He lost the popular vote by a not-insignificant 3 million, and Election Day was the high point of his popularity.

In conservative Montana, a state Trump carried by more than 20 points, a weak Democratic candidate lost to Republican Greg Gianforte by only 6 points. The half-empty-glass view is Gianforte should have done far worse for having physically attacked a reporter on the eve of the election. But that ignores the early voting; the cake had largely been baked by then.

Democrats do have a lot of issues to work out. Their messaging could use significant improvement, and they need to groom strong candidates.

But generic congressional polls consistently show a clear preference for a Democratic takeover of Congress. This is no time for debilitating mood swings.

Democrats felt dispirited and powerless through much of the George W. Bush years. They took back the House in 2006 and the Senate and White House in 2008. Things change, and — depressives take note — not always for the worse.

E-mail Froma Harrop at fharrop@gmail.com. Follow her on Twitter: @FromaHarrop

To send a letter to the editor about this article, submit online or check out our guidelines for how to submit by e-mail or mail.