17 weeks pregnant and newly single 😥

So I got pregnant by a man I was only with for 3 months. However, when I told him I was pregnant he was all in, very excited and basically talked me out of getting an abortion. He has been to every prenatal appointment, was picking out baby names, and planning a baby shower with me. We were in love or so I thought. That all came crashing down about 2 weeks ago when his girlfriend of several years contacted me and wanted to know what was going on between us. Long story short he decided he wants to work things out between them. As a condition of being with her he is to have no contact with me whatsoever. He informed me via text message that he will no longer be going to any appointments and for me to call him after the baby is born so he can take a DNA test, although he has never questioned the paternity before. I’m devastated and seriously thinking about letting him sign his rights away if that’s what he wants to do. Is this a good idea? I don’t know what to do. I just want to be done with him forever.