There's no easy way to say this but what you are missing and what is causing you pain is not the love you feel for your EX-wife. What is causing you grief is:
1) The fact that you are missing the day to day joys of being a father, and
2) You're also missing the time of your life when you felt you had everything under control; family,love, job, extra-marital love too probably.
Your past actions have caused you to lose the right to #1 and even joint custody will not give you the right to be an everyday onsite father. Grieve over the loss of your son and understand that your relationship is on a different level andmake peace with that. At moments in his development you will be closer as a father and son, whilst at others you will be worlds apart. Don't push it. Enjoy the journey with your son... but from the outside. Just ensure that he knows that you are always there.
Regarding #2; your life is no longer controlled by you. It is now controlled by your EX-wife... but only insofar as your son is concerned. If you keep looking to win back the time when your life was under YOUR control... I have news for you... thats gone. You're not in love with your ex-wife... you're in love with your EX-Life.
Its time to move on. Make peace with yourself, your situation, and make a plan to ACTIVELY move on with your life. Gym, have a date (you were good at getting them before.. hehe), travel, change your friendship circle, start a new sport or hobby. But move on.
Nostalgia is like dishing up the past from the rubbish bin, dusting it off and thinking that thats when your life was perfect. It never was.
You've started to look in the mirror. Now fix what was broken about your own behaviour and then forgive yourself. And then move on.
When you look back in 10yrs you'll hopefully appreciate the past for what it was and the present for what it is.
Good Luck.