The mental illness was not originally apart of the character. That came about under the pen of Roy Thomas, who wrote the story of his first psychotic episode. Basically, massive stress and anxiety combined with his own insecurities and guilt over his robot, Ultron, turning evil and killing people, culminated in him entering a dissociative fugue, which is a fancy way of saying amnesia coupled with a new, adopted persona molded around the circumstances her was in. That was his first bout of mental illness, and it came more or less out of nowhere. The handling of his mental illness didn't start off as being super well explained or realistic (in the original comic it was just "overwork + guilt + wacky chemicals = crazy"), but over the years the diagnosis of bi-polar disorder has sprung up as a means of tying it together in a slightly more realistic fashion (as extreme cases of bi-polar disorder, usually coupled with outside stressors, can and have resulted in dissociative episodes somewhat like the ones Hank has had in real life). Also, Hank and Janet didn't have a bad relationship from the start and I think it's important to stress that their relationship is not an example of domestic abuse as it is classified. He struck her exactly once during a mental breakdown where he would have struck anyone who had been near him at the time. It was never an issue of power or dominance, and his grasp of reality was tenuous at best at the time. The reason for their rocky relationship since then, despite his full recovery and her forgiving him for it, is really just because it's just this awkward thing hanging between them and Hank, to a degree, won't allow himself to forget it happened. Him being a wholesome guy who cared very deeply about his wife is a huge part of whop he is and it's who he was from the start. But his struggle with mental illness, while not originally apart of who he was, has become apart of who he was and is part of what makes him distinct. He's a guy who has days where he'd rather lie in bed until he dies instead of face the world, but he does it anyway. He has this feeling, deep inside, which he can't control, that what he does isn't ever good enough, that he's not anything special, that he's always alone. No matter how big he may get as Giant Man, he always feels small, which is why he's probably more comfortable as Ant-Man, because when he's tiny he can hide and be clever and not be exposed to the world. But with the exception of the two aforementioned episodes (which were under very extreme circumstances involving explosions and killer robots), he isn't crippled by these feelings. Even after this stuff happened to him, he's almost always drawn in the comics smiling. He goes about his day, he sees his friends, he lives his life and he does great works, but he's always carrying this weight along the way. There's always this hint of despair. And dealing with that, living in spite of it, is part of what motivates him. Personally, I think it makes him very interesting and kind of sad, but in a good way as far as stories are concerned.