"Sometimes bad things just happen, and it's nobody's fault," says one of the characters in "Head Cases," a new Fox courtroom drama. Unfortunately that sounds an awful lot like the producer of the show attempting to let himself off the hook.

What's sad is that "Head Cases," unlike the previous Fox series that have already made their premieres, has real promise and potential, especially in the character of young lawyer Jason Payne, as earnest Chris O'Donnell plays him. As the show opens, we see Payne's richly upholstered life going terminally askew -- as Johnny Carson used to say, right into the dumper.

Unfortunately that's eventually where "Head Cases" goes, too, taking O'Donnell with it. Fox, and series creator Bill Chais, could have devised an arresting drama about a young man like Payne living a dreamy and affluent existence, suffering an emotional collapse, then having to reinvent himself to survive when released from treatment.

But in tonight's premiere, at 9 on Channel 5, things go wrong for O'Donnell as well as for Payne. The premise is bungled by having the head shrink at the mental hospital force Payne to team up with another patient who is also a lawyer -- a manic, hot-tempered, insufferable basket case named Russell Shultz, played by Adam Goldberg as if auditioning for the role of Woody Woodpecker.

It takes special talent to play an irritating character in a way that endears him to the audience. Thus the genius of Dustin Hoffman in "Rain Man." But Goldberg's Shultz is just a thorn in the side of the show and a poke in the eye of the viewer. Apparently Shultz has a touch of Tourette's syndrome, since he has a habit of insulting everyone, including judges presiding over his cases, and a violent streak, since he bashes one opposing attorney in the head with a law book.

The prognosis for Shultz is that there is no hope. Why would a psychiatrist team him with someone like Payne, who shows every sign of making a recovery? It's not the most original idea in the world, but Payne could have humbled himself by going from the ritzy-shnitzy uptown firm where he'd worked to a ragtag, upstart firm, like the one in "The Practice" when it began.

Payne not only melts down at the office, but when he gets home that night, his heartless wife has changed the locks on the house and left his packed bags out in the rain. He checks in at the Four Seasons Hotel (at least he still has some dough) and imagines that the faces on TV are talking directly to him. We feel an emotional connection to Payne. That's mainly because O'Donnell -- who unforgettably held his own against Al Pacino in "Scent of a Woman" -- gives such a credible, conscientious performance.

It's said that Payne had a "nervous breakdown," even though the term is no longer in fashion. After two months at the equivalent of Happydale Sanitarium, he returns to his home firm, Hawkins & Bates, naively expecting to get his old job back. The senior partners are portrayed as reactionary bigots and dirty double-crossers, however. "I'll be at a new firm within a month," Payne vows, but for reasons not made entirely clear by the script, he can't get hired.

Can it really be that in Los Angeles, where at least half the population is certifiably insane, there's still a deep-seated prejudice against people who are getting psychiatric care? That would be the height of hypocrisy.

Most of the shows now on network television, whether repugnant or tolerable or actually worthwhile, are competently and professionally directed, edited and photographed, but "Head Cases" is a mess even as a piece of storytelling. Goldberg seems just as out of control as the excruciatingly abrasive Shultz is supposed to be. Shultz's habits include dropping in on Payne at 2 in the morning, limiting his clientele primarily to "nymphomaniacs and porn stars," and nervously tapping his cowboy-booted feet on the floor.

"I'm like God. I know everything," he says at one point. But he's clearly a menace to himself as well as to society, and it's hard to believe he would be allowed to run around loose by the police, much less the psychiatrists handling his case.

Chais throws in a last-minute complication to compromise Payne's character, a case of misconduct earlier in his career that is inconsistent and out-of-the-blue. It's sad to see the show self-destruct like a tape on an old "Mission: Impossible" episode. Whenever O'Donnell and his character get things back on track, Shultz is thrown in to knock it off again.

For the record, Dr. Ruth Westheimer, whose days as a celebrity seem rather over, pops up as an expert witness in one of Shultz's cases, which gives the show an excuse to include words like "vagina" in the dialogue. The character of Shultz is introduced with a sight gag that makes it appear he is pleasuring himself under the covers of his bed. That sets the tone for him, and symbolizes the kind of wrongheaded impulses that have scuttled many a TV ship.

As for O'Donnell, he should sue, in a real court, especially if anybody led him to believe he'd signed on for a serious, quality drama. At least he can take satisfaction from the fact that every attempt by Goldberg to steal scenes from him ends in Goldberg's defeat. When the senior partners meet with Payne to fire him, they say, "Don't make this about you," but "Head Cases" should have been. Instead, it is about zilch. And it feels about an hour too long.

Head Cases (one hour) airs tonight at 9 on Channel 5.

Unlikely partners Adam Goldberg and Chris O'Donnell are trying to get their law careers back on track after a stint in a psychiatric hospital.Adam Goldberg, left, is a major liability to the new series, which also stars the earnest Chris O'Donnell.