Unplanned pregnancy ending in miscarriage

My boyfriend and I were so scared when we found out we were pregnant but that quickly passed and we were overjoyed to be expecting (his first, but my second child).. just about as quickly as I found out it was quickly taken away from us. I was 5 weeks. We are both gutted and don’t know where to go from here. We’ve talked about trying for our rainbow but considering this was unplanned in the first place I am unsure. My son is 3 and I would love to have another I think. I just have so many emotions going on. I hope I can get past this soon :(