I'm not sure I understand all of your post, but I can tell you that your child should be your highest priority. Children are a wonderful gift and another chance to make things right and improve ourselves.
Focus on doing right by him even if you are not able to see him right now. Eventually it will make you become a better person.
Your ego and feelings have to take a back seat to get your life back on track to move forward and be happy. Every thought you think, every word you say, every action you take should be done with him and his highest good in mind.
When you want to mouth off to your boss, restrain yourself and think about how you need to keep your job to be able to provide for him.
When you want to waste money remind yourself that you need to be careful to make sure you can provide for him.
When you want to be mean and overbearing to your girlfriend, remind yourself to hold your tongue and be kind and gentle to her no matter how much you don't want to be because it is best for your son.
When you want to give up, keep on trying to do the right thing. You will make mistakes because everyone does but you can always find ways to make good come from the mistakes.
Be strong enough to apologize.
Be smart enough to hold your tongue.
Be humble enough to eat some crow to get your life back on track.
Listen more, talk less.
Focus on yourself less and others more.
Try to imagine what it is like to be the other person and what they might be thinking, feeling, and needing from you instead of what you think you need or deserve. Ego lies. Do not let it rule you.
You will get there eventually.