I am going to make some assumptions so please forgive me if i am wrong.
That you may be suffering from ante-natal depression. You must be really really scared because your mind is probably playing all sorts of nasty tricks on you and you are not thinking straight, or logically.
You mention that "saying goodbye" before your child is born wouldn't be fair on your child. Absolutely correct, but don't you think your child deserves to know his or her mummy? That whatever bad thing has happened to you in your life, this is your chance to experience true, unconditional love - i promise you, nothing can prepare you for that, it hits you like a truck. It can be overwhelming and scary for you though, all that love and all that vulnerability and you are the centre of that child's world. Don't take that away from your little baby, he/she needs you.
There is some good news - this is treatable, its really shit and really scary and you probably feel really hopeless but if you could just reach out, like you have so bravely done here to someone in RL there is help out there. Sometimes it can be a simple (yep really that simple) as medication, finding the right medication to tackle the hormonal upheaval that having a baby brings to your brain and getting to a point where you can start to feel better. It wont be easy but think about some things
When your little baby grabs onto your finger with his tiny little hand
When he first says mummy
His first day at nursery when his eyes light up to see you waiting to take him home, excited to show you what he has made, relieved that mummy is there.
School plays
hearing "i love you to the moon and back" or similar.
All of that and so much more.... you deserve to have all of those things and you can, you really can.
Its a pretty shit world we live in just now, but its all about the little things really.