As I recall, in the early modern period in Europe, there were a series of murders of children. The murders wanted to die, but not be damned for suicide. They thought they had found a loophole, so to speak. Kill a child, who was pure and should go to heaven anyway. Then confess before the gallows. You get the benefits of death, but without the damnation. It was enough of an issue that some areas of Germany changed the law so the death penalty no longer applied for killing children