scared FTM

Throughout my whole pregnancy I've struggled with quitting smoking on and off. I quit and then relapse. I get soooo depressed from other things that it caused me to constantly relapse. And relapsing has made me even more depressed. I feel like such a horrible mother 😪 I wanted to be pregnant so I had a reason to quit. At 37 weeks I found out that my baby was IUGR measuring at least 3-4 weeks behind in the 10th percentile. Only weighing 5lbs 4oz. I am now 39 weeks 3 days and my baby is only estimated to be measuring 5lbs 15oz. I'm severely depressed and constantly crying my eyes out because I can't do anything. I'm scared that my baby is going to die from SIDS and all that other scary things that I read on the internet. I try to stay off the internet but it's hard not too read things so I don't feel so alone. I hate venting because I know I'm going to be judged as a terrible person for smoking on and off throughout my pregnancy causing this on myself. And I can't help feeling that it's so much more that caused this. I was told I had mild anemia and I avoided taking the pills and tried to get it from foods but don't think it worked. I drank at least 1 ensure daily just to help my baby gain weight and it didn't work. He only gained 300-400kilos in 2 weeks. Couple days ago I dreamt I gave birth and my baby died and I couldn't do anything to bring him back. I'm just so scared to lose my child. To have came this far to just hope to see my child be born and grow up. I pray so hard hoping God answers me when I beg him to protect my child from the mistakes I constantly made. And today at my check up my baby is still measuring behind by 3-4 weeks. I just lost all hope that their is and preparing myself for the worst. I just feel helpless. My baby is due on 10/23 and I'm even more scared to leave him in another week because I don't think he's ready to come out this weekend. I read online that IUGR babies that stay in too long die of stillbirth. Which has me even more depressed. I don't know if I need help, a hug or just hope. But I really just needed to write to get this off my chest. I'm a tiny girl I'm only 5'3" and weighed 100lbs before being pregnant. And now I'm only 120lbs. I don't know if me being tiny has much to do with my baby being tiny but most people say that I shouldn't panic because I'm tiny and I shouldn't want my baby to be too big. But they never had to see that their child is measuring below 10th percentile. I just want to keep crying until he's here and pray that he's healthy and survives.