Whether it's a sudden occurrence or the result of a long health battle, losing a pet is never easy.

While there are ways to deal with the emotional side of the loss, how to deal with the physical side of things — what to do with the body — is a whole other task for which you may not be prepared.

It can feel morbid to plan ahead for any death, but it can also make things easier when it happens. So consider your options and what will work best for you and your pet.

What to know about burial

A pet's headstone decorated with flowers and ground lights Pets can be buried in a yard — depending on laws — or in a pet cemetery. (Photo: Antimon/Shutterstock)

Your first instinct may be to bury your animal companion's remains in the backyard. It's easy since the soon-to-be grave site will be nearby, and it doesn't involve anything more than some hard labor in digging the plot — but that's not the whole story.

First, you'll need to keep the body in a secure, cool place while you're digging the grave. The American Society for the Prevention of Cruelty to Animals or ASPCA says a body can be kept for around 24 hours, but the sooner you move it to a more appropriate location, the better. If possible, wrap refrigerate or, if you don't want an autopsy performed, freeze the body. If the pet is too large for a refrigerator or freezer, place the unwrapped body on a concrete slab or cement floor to draw the heat away from the body. If these aren't options, the ASPCA recommends placing the animal in the coldest part of your house and packing ice bags around it.

Another thing to consider is that state and local ordinances may prevent you from burying animals on your property, even if you own the land (and forget it if you're renting or living in an apartment complex). As a result, it's important to check if your town, county or state has laws about burying animals on your land. These laws are often in place for the health of other animals that could dig up the the remains.

This can be especially problematic if you euthanized your pet, or if the pet died from a disease of some kind. Chemicals used for euthanasia can linger in a body for up to a year, and any animal that ingests the remains will also ingest what is left of the euthanizing solution. This can result in the other animal becoming sick or dying as a result. The same holds true of viruses that could potentially be transmitted from consumption of the remains.

If a home burial isn't an option, pet cemeteries do exist, and you can bury your pet in these locations without any legal concerns. Your veterinarian should be able to point you to reputable places for this process. Do your own research as well to make sure the cemetery is properly zoned and ethically operated. These cemeteries provide a permanent place to visit your animal — no need to worry about what to do if you move from your current home — as well as grave site markers. Some may also offer a wake or viewing venue.

What to know about cremation

Trio of pet urns, memorial candle and old collars and toys Cremated pets can be placed in urns, just like humans. (Photo: Igor Sokolov (breeze)/Shutterstock)

If burial isn't an option wherever you are, pet cremation almost certainly is. Many veterinarians offices have connections to pet crematoriums, and some will handle the cremation arrangements for you, though likely at an additional cost. In 2015, roughly 70 percent of pets that entered the afterlife care industry were cremated rather than buried.

When choosing cremation, the primary decision you'll have to make will be whether you want an individual cremation or a mass cremation. Individual or private cremations ensure that only the ashes of your pet returned will be returned to you, and many crematoriums will offer, at an additional cost, a viewing of the cremation so you can be sure your pet is cremated alone. You can then store the ashes in an urn or a figurine of some kind. Crematoriums offer a selection of storage containers, or you can purchase one online.

Mass cremation is exactly what it sounds like. This is when multiple animals are cremated at the same time. This option is almost always cheaper than the individual cremation, though both options may vary in price depending on your pet's weight.

If cremation by fire isn't a good fit, there is another option. Alkaline hydrolysis, often called aquamation, is similar to cremation, but water is used instead of fire. The pet is submerged in a tank of water and the decomposition process is sped up through the solution in the tank. The process takes around 20 hours, and like cremation, what's left are bones. Instead of ashes of soft tissue and skin, however, aqumation results in a sand-like substance that lacks black bits of carbon.

Aqumation is marketed as a greener, more energy-efficient way to dispose of a pet's remains, as you can see in the video above. It uses less energy than cremation, and it doesn't emit greenhouse gases, either. It's also a less "violent" process compared to cremation, and many aqumation businesses highlight the more "natural" aspect of the process. Aquamation is also sometimes cheaper than cremation, depending on the business. Like with crematoriums, some aqumation businesses will offer memorial plaques, paw prints or even viewings prior to the submerging.

What to know about donating to science

If neither burial or cremation (or aquamation) seem like a good idea, you may want to consider donating your pet's body to a university or veterinary school.

Not unlike human cadaver programs, donating your deceased pet to science can help to train new generations of animal caregivers. Students will learn anatomy, surgery and even pathology through donated remains. If your animal was sick, tissues samples may be taken for comparison to other illnesses and to research better treatments. Either way, your animal is helping advance the cause of animal science and health.

After the university or school is done with your pet, the animal is cremated. You will not get the remains back, however, so this is something to keep in mind.

If you want to go this route for your pet, it's best to reach out to a university or veterinary school prior to your pet's death to see if they will accept your pet. Your veterinarian may be able to help you with this process if they have a relationship with the university or school. Paperwork needs to be completed and the proper people notified before a pet is donated. Each school sets its own guidelines to ensure a smooth donation process, so, again, it's best to have this as arranged before your pet dies.

What to do with the remains of a beloved pet
Handling your pet's remains can be a taxing and difficult task, but it's one that is important to think about before your pet dies.