He left Pam (and Scranton) because she was still going to marry Roy. His admission of his feelings and kiss was just a last-ditch effort to win her over, one he thought failed. It's all pretty unrealistic anyway. In the real world, no woman would leave a hulking alpha male like Roy for a lanky pushover like Jim.
I always root for Dwight against Jim, though.
--
Yoblazer: http://oi53.tinypic.com/2hd0dh1.jpg
Watch and you'll see... someday I'll be... part of your world!