Well, he's crazy. I mean, that much is obvious. And it's confirmed a few times. But I'm not sure he can be classified as mentally ill. He functions well, he has excellent social skills (most of the time), he's able to keep relationships going, hold down a job and raise five children.
I know, mentally ill people can do this, but Hal is just crazy--there's a fine line, sure, but I don't think Hal ever crosses it. It's a special kind of crazy a "man building a rocket in his brain as everything goes on around him." Or however Linwood Boomer described him on the Season 1 DVD.