The reality is that women give birth and the vast majority take on the bulk of the work raising the child. When I see a man step up -- and not just watch the kid a couple of hours a day; I mean 24/7 feeding, bathing, clothing, disciplining, educating, comforting, encouraging, transporting, playing, etc. -- I'll maybe, just maybe, start to feel sorry for how "unfair" the situation is. The OP is going to bail; I know it and the girlfriend knows it. He'll have to help support the child financially (and not just because the government tells him he has to but because it is the right thing to do), but whether she planned the pregnancy or not, she's got the short end of the stick in this situation. If she doesn't know it now, she'll certainly figure it out over the next few years.
To the OP, man up. Stop feeling sorry for yourself. It's not about you anymore. Keep on good terms with the mother. Commit to having a relationship with your child. It's hard work, but it will be worth it. Your child carries you inside; help him or her become a good person. When you wake up in the morning, be the kind of person you can respect. Be a man of character. I'm sorry your life has taken this unexpected turn, but cope.