you handled the break up perfectly the only way you can get a woman back once you've been dumped is to walk away and be consistently strong, and move on. There's nothing you can say no combination of words you can use to make her realize oh shucks I really love him I was stupid to dump him. All you can do is walk away and move on with your life. However in your situation I would strongly suggest you look into whether you're the father of that child like the other poster's said this sounds weird to me.
For future reference when a girl gets distant you take it in stride like a true alpha male that is not dependant on the feelings of others for his own happiness and 1 of 2 things will happen she'll come back or you'll move on either way its a win win situation. There's 2 ways to do this girl gets distant go NC right off the bat or call her suggest you want to see her spend time with her. If she gives you a distant response say ok well text me or give me a call when you're free, and leave it at that your only job from there is inaction, and it is the ONLY thing that will get her back. I'm speaking from personal experience. If you send a text asking what's wrong or why she's acting distant which isn't outrageous she'll only see it as needy, and right there you've hurt your chances of getting her back. I've been there I was dating a girl she told me about her family/work/school problems so I texted her to see how she was doing she didn't return it for a week, so I called her no answer so I left a vm saying I hope things are working out and to give me call. Well next contact I had with her was a break up text. Lesson learned.
Fast forward to now I've been dating a girl made the mistake of over pursuing she got distant I walked away and realized inaction is the only thing that will fix my situation so that's what I did I saw her this weekend, and she was extremely warm and receptive introducing me to family and friends. I strongly suggest you check out this website
www.understandingrelationships.com.
Anyway I know its a long winded post, but that's my story hope it helps good luck!