This exact same thing happened to me OP.
Early months of a very good relationship and we had told each other I love you. Had a few talks about the future but nothing too serious as we were still only a few months in. I was taking the pill, not missed one and became pregnant.
I had ALL the same thoughts you are having now. My brain was racing with them and all I could think was he would think that I had purposefully trapped him. He was such a lovely man but I had no idea how he would react to the news and how he would take it. Would this set us up to fail now or could this work?
In the end I knew I had to pluck up the courage to sit him down and tell him. He reacted very well and saw it completely as 'our problem' and something that had happened to us and something we needed to work through together.
That night we talked well into the night about 'could we do this?' 'should we do this?' and we both decided we wanted to continue our relationship and give this a go.
Our families were a little surprised by the news but ultimately behind us all the way and supported us which we were very grateful of.
Unfortunately at the 12 week scan the baby had no heartbeat and the pregnancy ended which we were both actually heartbroken about. But it made us stronger as a couple than we had ever been and we supported one another through our loss.
We got married the following year, had a child together (I already had one from my first DH) and he adopted my first child. We became a little family and we have now been very happily married for 20 years.
So, I understand totally the mixed feelings you have right now, but I would encourage you to be open and honest with him about what has happened. You will see by his reaction what his real thoughts are and will get a glimpse into the real him.
You also need to think if YOU want this baby and if he decides not to be part of it, can you do it alone and do you want to do it alone. I also had to decide that too.
Sometimes life throws us curve balls. This could be the making of you and actually be the best thing that happens to you. If the relationship now fails because of it then it was never meant to be.
Good Luck xx