Hank Pym has a long history of mental trouble.
He used many identities over the years; first Ant-Man, then Giant Man, then Goliath. Then the first severe mental change happened:
Hank Pym had long been in love with Janet van Dyne, but because of his repressed personality, and her abundant wealth, he resisted marrying her. One day while working in his laboratory, Pym accidentally dropped and smashed some vials containing various unknown gases, which wreaked a radical personality change; a sort of severe schizophrenia. He took the identity of Yellowjacket, who claimed that he had murdered Henry Pym, kidnapped van Dyne, and proposed marriage to her. Realizing that Yellowjacket was really Pym, Van Dyne decided to play along, fearing that she would worsen his psychological condition if she did otherwise.
After this, Hank stayed with his Yellowjacket identity even though he recovered his original persona. Later, he got very frustrated juggling his crime-fighting career with his preferred science career and was plagued by guilt over creating Ultron. He got increasingly erratic, using verbal and later physical against Janet/Wasp, and eventually leaving the Avengers after a self-created threat designed to show his usefulness to the Avengers backfired.
He eventually redeemed himself, but decided to forego crime-fighting and focus on science. He thought that regular size-changing might have harmed him mentally, so for a while, with the West Coast Avengers, he adopted the identity of "Hank Pym, Adventurer", where he used his Pym Particles to shrink and grow stuff other than himself.
Much later, after Janet van Dyne died, he adopted the identity of The Wasp in her memory, which his colleagues thought rather disturbing, and endangered his Mighty Avengers team in an effort to prove he was a greater scientist than Reed Richards.
In the Time Runs Out storyline, he again assumes the Yellowjacket identity and goes off into the multuverse to find Rabum Alal, instead finding the real originators of the crisis (dare I say it) on infinite earths. This ordeal also seemed to have affected his mind.
I haven't read up on what happened to him after that, but the Marvel wiki has tons of detail