The study of death is thanatology. If you're interested in philosophy, medicine, and the details of death and dying, you might want to take college classes in thanatology.
There are many aspects to thanatology, from the psychological care of dying medical patients to forensics, the science of death and determining exactly how a person died. The word thanatology comes from thanatos, "death" in Greek. There was a brief period when some undertakers lobbied to be called thanatologists, but it never caught on.