Advice please

Ok here goes.... so I was seeing this guy for almost a year I started to really fall for him, he then started to become distant then just very recently he messaged me telling me he had gotten another girl pregnant and that he didn’t want to be with her but feels he’s has to for the baby..... should I just give up and try to get over it or should I hope he will figure out that he doesn’t need to be in a relationship with this other girl to be a dad ?