I'm very sorry for your loss.
Can you distract yourself -- movies, TV, puzzles, video games?
If you are afraid of hurting yourself, can you tell friends/family how you feel and ask them to stay with you or keep an eye on you for the night?
If you really need to sleep more than anything, maybe try to do things that normally relax you even if nothing seems to relax you right now. Other ideas are a strong chamomile tea or valerian root.
Sometimes even just lying down in bed wide awake can be restful if you don't get stressed out about the fact that you aren't sleeping. It's not as good as sleep, but it's better than nothing (unless you get stressed out about the fact that you aren't sleeping, in which case it probably does more harm than good).
If nothing else, remember that there is no deadline for processing your feelings and what has happened....it will probably take time and you don't have to do it all right away or right now. You will sleep again eventually even if you can't sleep tonight.
_________________
"Coming back to where you started is not the same as never leaving." -- Terry Pratchett, A Hat Full of Sky
Love transcends all.