It's always a shock when you find someone has died. Various things do need to be done and it's rare that you'd know what they are. While you'll find a list of things to do on our site, Hazel points that you can deal with things in your own time:
"We always try to bring a sense of calm to the situation and give control to families. With that in mind, there isn’t a legal requirement to call the doctor immediately; most families will want the doctor to attend as soon as possible to confirm the person has actually died, but there’s no harm in taking some time to just be with the person for a little while first if they want to."
Obviously if the death is unexpected or appears to be the result of injury, it is important to call an ambulance. It would be unwise to try to diagnose death yourself.