Miscarriage

Kait
Today I went to the doctor because I've been bleeding for over a week and that's abnormal for me. I have an IUD and haven't had a period since a month after getting it. My doctor told me today that I was having a miscarriage. It's rare that a pregnancy happens while using an IUD but miscarriage or complications are very common in those cases. I'm kinda numb to it right now but what I don't know is if I should tell my boyfriend and how I tell him. I mean we obviously weren't trying to get pregnant but I also think I would feel kinda bad if I didn't tell him. Anyone who's experienced this?