Was this your first death? Being a hospice volunteer can be very challenging so it's extremely important for you to maintain professional detachment so you don't burn out. Hopefully you weren't too much in shambles internally, but if you were and it continues to happen, I suggest you talk to your volunteer coordinator to ask about ways to cope better. I'm not saying you should be an automaton. I have cried at many a patient's passing. The most difficult try-not-to-lose-it-completely experience I had was when the patient was still alive, the whole family was there, and the primary caretaker took the opportunity to talk about how each person in the room was unique and important to them during that difficult time and included me in that list. It was amazing and wonderful and terrible all at the same time.
I think hospice is a great way to learn about an aspect of medicine that people, including doctors, hate talking about. It's also a great way to grow and learn to be kind and caring without letting your own emotions get in the way. ZDoggMD has a great video on compassion vs empathy in all its formms as a healthcare provider: