Miscarriage

So im 18 and about to finish my senior year of highschool and a few days ago i went to the hospital with horrible stomach pains like rolling on the floor basically screaming cause it was so bad

And i live at home so my mom took me to the hospital and they took some blood and ran test and my mom had stepped out and the doctor said youre 18 so we dont have to tell your mom and they told that i was hcg positive that meant i was pregnant and he did an exam and confirmed i was miscarrying

And they gave me some drugs at the hospital for the pain and sent me home with a scrip for some medicine to help with the pain for the next few days it didn't hit me til the next morning and i cried for a while and i dont know if it was because i was mourning a loss or that i was frustrated that i didnt know i was pregnant and i had a miscarriage and couldnt tell my mom or that I realized if i didn't miscary i would have kept it

I had always told myself if i ever did fall pregnant I wouldn't keep it cause i didnt want and couldn't be ready for it until i was older

Im 18 just about to start my life i couldnt handle a baby so why am i so upset about this i didnt even know it and I didn't have to choose it just happened

Iim sorry for the long post i just dont know how to deal with these emotions cause i dont know what they are