I did the same thing and my baby came out just fine
Congratulations, I realize that this must be very stressful for you, but we women do our best work in the most stressful situations. You must realize that you are not the only one in this predicament. We get this question on this forum over and over again from wonderful caring women who want to have healthy babies. You must talk to your OB/GYN and I am so glad you have found one and are going to your first appointment soon. They treat many women in exactly the same situation. They will help you, because abrupt withdrawal may well be dangerous for the pregnancy.
You may be able to slowly taper the heroine off. Your baby will withdraw slowly with you without any problems as long as you do it under close supervision of your obstetrician or midwife. If you are able to be off of all the opiates by the 20th week of pregnancy, then the newborn's meconium (stool) will be drug free if they should test it. As you will taper yourself slowly by spacing out the times and decreasing dosage, the baby will also withdraw slowly and safely together with you.
This way, by your third trimester or certainly by the time of the delivery both you and the baby are clean and ready to start healthy bonding and nursing.
The OB/midwife will also be there to guide you though good prenatal care, healthy nutrition, smoking cessation (if necessary), etc..
Good luck to you, motherhood is a career full of joys and pain, but we all do it for the joy of it...
P.S. Please read my blog on Pregnancy and Addiction by clicking on name in blue and then on blogs. Good luck to you and your growing family. You must take care of yourself for your baby.