Hi there. Try not to beat yourself up about what has passed, babies are enormously resilient and the stress will do you more harm. Finding out with only 4 months to go is quite a lot to get your head around! What is now important is the choices you make from this day forward. You're far from alone, I had a honeymoon and epic hen night out on the beer before I found out I was expecting yet everything baby is a fine as it can be and I suspect many other women are the same if the truth be known.
Concentrating on making healthier choices from now on will only benefit you and the baby and if you can kick the smoking into touch for good you'll benefit for the rest of your days! Don't forget to ask for the help you need -your MW/ Dr will be totally supportive of this.
Good luck, you've got loads to look forward to