You've hit the nail on the head exactly - you can't control this situation. You're not intentionally depriving him of a sibling or upsetting him. You're obviously raising a very empathetic little lad since he is recognising that you are sad and making attempts to comfort you. He'll be fine, it's ok for children to know that adults are sad sometimes. I had a MC when my oldest was about the same age and then a successful pregnancy so have a 3.5 yr gap which has worked out really well for us. Then it's taken a long time to TTC no 3 (still trying) with a MC along the way - heading for a 3.5yr+ gap between the 2 youngest from now. We haven't told the children either time what has happened and would be very wary of telling them about any future pregnancy until it was well advanced, but of course they know Mummy has been in hospital and is unwell and sad. He will be ok, he might be momentarily sad about it but then he'll go off and play. My older DS started talking about having a baby sister recently - he has it all planned out, what school year he'll be in when she's in reception and how he'll look after her - made me really but I know that he'll be equally ok whether or not it ever works out for us, and your DS will be too.
I am coping better at home since a MMC on 4 Dec but my DC who is 2 1/2 just floored me by saying 'I haven't got a baby sister yet' and I feel awful about crying in front of him. He said 'you're feeling sad' and gave me a cuddle but I worry that it's upsetting for him. We hadn't told him that he was having a baby brother or sister but had asked him if he'd like one and he was very keen. All his little friends from our NCT group now have babies at home too, and I feel so bad that I've let him down. I hated being the only child at home (2 much much older brothers who'd left home by the time I can remember anything) and so desperately want him to have siblings. It's horrible. I don't think it's a good idea to try to explain what;s happened as he's too young to understand, but I'm worried I'm upsetting him when I can't control it.