what really happened [SPOILERS]
Here's what happened. Jack had a near-death (almost too near) experience in Iraq. He had obviously sustained damage in part of his brain and so did not have all memories sorted out. He was then charged and found guilty for killing (although he hadnt) that officer, and was admitted in that psychiatric hospital. He was given that 'experimental' treatment by dr. righteous, who without even having a hint about it, had managed to open a portal to the future, to 2007 more specifically. For reasons that clearly are not explained that portal DID exist, and could carry over info and consequences from one end to another. i say quite categorically that it exists because he couldnt have knowledge about other people, and peoples treatments in just his fantasy world. ( a personal theory: we hear about how we are using only a small amount of our brain, and therefore its capabilities. It might be possible that while Jack's war injury negatively affected his brain's memories, it could have somehow awakened some of its other capabilities like time travel, especially when combined with a cocktail of psychoactive drugs. :D Which ofcourse would mean that the portal actually only worked for him-besides we hear nothing strange about the other 3 patients given the same treatment by dr. righteous-except that they were all treated to death)
Anyway, from that point it was quite obvious really. Whenever he was travelling to 2007, he had to return to 1992 because his 1992 live version was 'pulling him back', being the 'origin' of the 'portal session', lets put it like that. His final 2007 visit is with no return ticket because his 1992 version dies, and thus, the portal is closed leaving him in 2007. His letter to Jean being the last 1992 action to affect his relationship with Jackie, obviously changed the future for the last time, so Jackie wouldnt have known him, except for her child memories ofcourse, when he went and stayed there as we saw at the end of the film. They would have to start all over again, with Jackie going crazy, etc...
So for hollywood lovers, it means it was a happy ending! Yaaay! :D