Leggy, your girlfriend did the wrong thing by letting the two of you get attached to each other so early. Rookie mistake. And hopefully she'll learn from this and protect the boy from it happening to him again. The best way to go about dating someone who has a child is to only start forming bonds after you know that the relationship has legs.
Have you considered what would happen if you stay as a part of this boy's life? When your ex finds a new partner, he's not going to want you around. And nor should you be still involved in their lives. So, when the new partner comes, you're going to have to go. Better to end it now than form even stronger bonds which will be torn apart when she finds a new bloke.
Kids are resilient. Well, at least they are if they are raised right. And it's only been 6 months - it's not like you've raised him since he can remember.
I'm curious about your reasons for breaking up though. We're talking erectile dysfuction? Have you investigated causes and solutions?
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.