Firstly, I am so so sorry for your loss. I have had two miscarriages and they are really difficult to come to terms with. You need to acknowledge your loss as just that, it doesn't matter how far along you were or if you knew or not - you have still suffered a loss. Also, don't think this will happen again in the future - I have had 2 miscarriages but I also have three healthy children. It is extremely common for a woman to lose her first baby - not much comfort I know.
You need to look after yourself - try if you can to eat properly - get out and about, if you need time to think go on a walk and do it - the fresh air and exercise will naturally lift your mood. This is just one event, as sad as it is, in your life and you have the rest of your life for good stuff to happen if you believe it. I know work is a worry but try and concentrate on getting yourself through this. Seeing a doctor may also be a good idea - I can highly recommend counseling. If you ever need to talk to someone please do not hesitate to PM me - I hope you are back to your best soon.