This is done giving psilocybin to alleviate suffering before death, there are studies with positive outcomes regarding this issue another substance is MDMA, here depicted in it's street embodiment called ecstasy 