Sex after a miscarriage

About four months ago I had my first miscarriage and though I wasn't very far in my pregnancy but it was still very emotional for me. However my boyfriend will be coming home on leave in two weeks, but how do I know that I'm emotionally ready to start having sex again?