honestly, never act jealous. never beg for his forgiveness, never show any sign of weakness. it will be hard, i promise, but you will be able to do this if you try. play it cool, act like you want to be friends and always be nice to the girlfriend. even behind his back, because if she feels that you are a threat, she's likely to whine to your ex about you being bitchy to her and if you were hoping to get back together with him, you're chances just got nixed.
the truth about most guys is, they like to pursue women, and it's much more fun than if you pursue them.
if he wants you back he wants you back, and it's your job from there to keep up the good work. :)