Seriously.. you never do. It depends though.. if you lost her/him through something that you did or didn't do.. forget it and live and learn.
If they dumped you, they're only a Chancer.. and you deserve more. Learn to value yourself and others will value you.
Best of luck- whichever way, it's OVER. Accept that and get on with your life.. be bigger and better. C'mon. Sort it. You lived and you were happy before they showed up.. you just gained more experience.