Standing too many months on the unemployment line is driving Americans crazy — literally — and it’s costing taxpayers hundreds of billions of dollars.

With their unemployment-insurance checks running out, some of the country’s long-term jobless are scrambling to fill the gap by filing claims for mental illness and other disabilities with Social Security — a surge that hobbles taxpayers and making the employment rate look healthier than it should as these people drop out of the job statistics.

“It could be because their health really is getting worse from the stress of being out of work,” says Matthew Rutledge, a research economist at Boston College. “Or it could just be desperation — people trying to make ends meet when other safety nets just aren’t there.”

As of January, the federal government was mailing out disability checks to more than 10.5 million individuals, including 2 million to spouses and children of disabled workers, at a cost of record $200 billion a year, recent research from JPMorgan Chase shows.

The sputtering economy has fueled those ranks. Around 5.3 percent of the population between the ages of 25 and 64 is currently collecting federal disability payments, a jump from 4.5 percent since the economy slid into a recession.

Mental-illness claims, in particular, are surging.

During the recent economic boom, only 33 percent of applicants were claiming mental illness, but that figure has jumped to 43 percent, says Rutledge, citing preliminary results from his latest research.

His research also shows a growing number of men, particularly older, former white-collar workers, instead of the typical blue-collar ones, are applying.

The big concern about the swelling ranks is that once people get on disability, they’re unlikely to give it up and go back to work.

“It’s not like other support programs, such as unemployment insurance, which you lose after a year or two,” says Michael Feroli, chief US economist with JPMorgan.

Social Security’s disability fund, which has been operating short of cash since 2005, is forecast to run out of reserves by 2018.

The jump in successful disability claims also is making the unemployment picture look extra rosy because those folks are falling off the jobless rolls.

“If they’re on disability they’re generally not counted,” says Feroli, who estimates that a quarter of those dropping out of the job market are getting disability. “It’s no trivial number.”