Your child is not guaranteed to be like his father was, and treat you badly. Yeah, there are some genetic components, but they're not as big as everone seems to think. Even if they were he'd still be half you in that sense.
On the other hand, you do have to accept the possibility he could be. No one can predict, nor should they try to control, who someone will turn out to be. That is one of the gambles about being a parent, guadian or adopter, you have to accept someone's independance and some of the randomness of existance and development.
There isn't really any big solution to these concerns that would not be a band-aid temporary motivating sentient. Parenthood is universally going to have some strife involved. Usually more than average if you're a singe parent. It takes strength and stability to provide this and remain stable and consistant for your kid.
For a lot of people, they rely on the other parent, the other parent's family, their own family, or friends for support. You say you don't have any of these. In this case, you would either need to reinitiate some contacts (or find new ones like with friends, teachers, social workers, psychiatrits, etc) or take measures to become stronger and more independant on your own. Basically, become a hardworking badass.
Easier said than done though, it's hard to be like that, I honestly haven't manaed being a badass for more than a couple months before crashing. I think this is generally because we can fall into a monotony of labour and forget ourselves, why we're doing it, etc. To remain strong, having adequate rest, regular introspection, and emotional assessments and reviewing of past decisions and whether you still want to follow them, is what would allow you to maintain it, I think.
For you, the motivatin would be the instinctive love you have as a mother for her kid, which would need to be enough on its own to counteract the stresses of the pursuit as well as any misgivings you could have about who the person turns out to be compared to your expectatins of who they will turn out to be. You would also have to learn to get past the physical characteristics of the father turning up in the son as an irritant, as they are bound to call up some difficult feelings.
Due to your uncertainty and admitted instability, it would be good to look into alternatives for your future child (as it is so late in the pregnancy and due to your love for it I assume you mean to keep and deliver the fetus). These can include adoption or entrance into foster care. Having these options open and readily accessible is good because it is the responsible thing to do when you doubt yourself and are going to be responsible for someone. It does not mean you have to give it up. Rather, by having the alternatives there, and easy to call upon, you know that if you do not use them then you are that determined to meet those resposibilities yourself.