When former senator Phil Gramm, an adviser to John McCain, announced that Americans had become a “nation of whiners” and said voters were in a “mental recession”, sending the economy into a rut with their negative thoughts, he suffered the political equivalent of the bullet to the back of the neck.

Americans like to see themselves as a nation of optimists. There is little that they decry more than the thought that things will not get better; that success, wealth and greatness will not be theirs if only they work hard enough.

Mr Gramm had committed a gaffe, as defined by journalist Michael Kinsley: he had been caught telling the truth.

Voters are down in the dumps on both sides of the Atlantic — and the economy, bumping along like a fat-bottomed child who has not learned to crawl — is only partly to blame.

Polls show that one in three Americans think things are “very bad”. Another third merely bemoan the “pretty bad” situation. Things aren’t much better back home. The governing party is 20 per cent behind in the polls. Three out of four think that the British economy is heading for the Mariana Trench.

What is shocking is that this doctrine of gloom has afflicted politicians too. The reptile set is used to looking adversity in the eye and finding a forlorn hope to cling to. Every senator, no matter how inept, rises each morningto view a future president in the mirror. The looking glasses of Westminster are similarly distorting.

The polls have shown for years that politicians are unpopular but that bothers only a few. This year, however, a deep depression has settled over the political class.

The public funk ought to be an opportunity for a politician to offer something positive. Only Boris Johnson, bounding Labrador-like to Beijing to demand the return of ox slaughter as an Olympic sport in 2012, seems to have got the memo.

John McCain, so the conventional wisdom goes, should be getting beaten like a cheap drum this year. He’s not, but Republicans are still down in the dumps. The polls suggest they have a shot, but their glass is half empty. The once-cheery McCain has sold himself to the right of his party but that hasn’t made them love him any more than before. He is only competitive because he has gone spectacularly negative. For these Republicans, GOP does not stand for Grand Old Party but Gathering of Pessimists.

With the economy plummeting quicker than an Olympic diver and the sitting president’s ratings in the toilet, the Democrats ought to be celebrating. They are not. Instead, every liberal hell-bent on internecine warfare has assembled at Barack Obama’s shindig in Denver.

Democrats don’t support assault weapons but they began their convention flicking onto full automatic fire and taking aim at their feet. “Obama can’t win.” There hasn’t been buyer’s remorse like this since Saddam Hussein got caught with a supergun.

One party official began the week telling me that the Democrats’ best chance would come if Mr Obama “fell under a bus”. A strategist, who has worked in senior roles on the last two presidential campaigns, proclaimed that the Obama campaign staff, widely hailed for their genius in leaving Hillary Clinton looking like Monty Python’s limbless black knight, are actually in the process of “blowing the greatest gimme in the history of presidential politics”.

Hope is out of the window, at least among activists who remember they have only won three presidencies since 1968. Pessimism is the new black.

In fact all that has happened is that a nation still divided down the middle, with two candidates that are broadly popular, has realised that it has another close election on its hands.

Republicans don’t like close elections. They expect to win much bigger. Democrats don’t like close elections because they assume that they will lose them.

Carry on like this and they will.

If there is one thing likely to send voters into a spiral of despair, it is the notion that even arrogant politicos, whose default mode is to claim to hold the answers to economic prosperity in their clammy palms, are stumped.

John McCain’s campaign is based on telling voters that Barack Obama is useless. Barack Obama’s campaign is based on telling voters that he is wonderful. The first one who channels the optimism of Blair or Clinton and offers policies that form an Ikea instruction manual to build a new version of Ronald Reagan’s “shining city on a hill” will win this thing. And they will deserve to.

Tim Shipman is Washington correspondent for The Sunday Telegraph