Did you go to the Mausoleum (that spooky-looking building)in the Cemetery after they died?
Click on it. Is one of the options "Manage the Dead"? It should be.
If it is, have a Sim go inside the Mausoleum (under the Manage the Dead command), and something should pop up. Are there two gravestones with their names on them? If so, put them into your Sim's inventory and take them home.
Then wait for something called "Oh My Ghost!" to pop up in your game. Take the opportunity, bring one of them to the lab, and you should get their ghost (you can do it with the other one, but the first time is free).
Once you have their ghosts, go through the process to get Ambrosia, and you should eventually get them back.