The ship ended up going to hell, yep...and yep, the doctor is the one who helped develop the gravity engine thingamajigger. I doubt he knew that the ship would end up in hell, though.
As for his wife...that was the ship's way of enticing him, or getting him to break down. I guess the ship figured it needed at least one human to keep the others trapped on board somehow, and it decided that the doc was the most likely candidate. Thus, it sent him images of his wife, and used them to drive him insane, and make him all evil-like and stuff.
And no, he wasn't on board with the first crew of the ship. They all ended up dying, it seems.