I know it must be really scary and upsetting but try not to think of it as a loss. If he really decided to leave you and your baby it's not your loss it's his. You will be gaining a child of your own to love. Motherhood is a gift and a blessing even when it is difficult. My mom raised 5 of us on her own when my dad decided he couldn't be bothered anymore and we struggled a lot but my mom was so strong and I'm so proud of her. I know other women who have gone through the same thing, being left alone to raise a baby on their own and I've been so impressed by their strength and the love they have for their children. My cousin had this happen to her twice and she just embraced her role as a mother and decided she would be the best mother she could be.
I do sympathise. My own pregnancy was unplanned and we went through a tough time at the beginning trying to come to terms with being parents when we didn't feel ready even though we were planning to have children one day. Maybe he will come around eventually. It takes time to adjust to the idea of having this huge responsibility when you weren't planning on it. Especially when you can't see the rewards that come with it yet. Men don't experience pregnancy the same way we do. Some of them don't bond with their baby until they are able to hold them in their arms while we carry them inside us for all those months feeling all their little movements.
If he doesn't come around and decide to own up to his responsibility as a father, just remember there are laws and he does have to help you out financially at least.
I hope and pray everthing works out for you. Good luck.