Danes Feared Damnation So They Committed Murder Instead of Suicide
If you're religious, you could think that killing yourself is a sin that will send you to hell. Catholics hold this belief, and in the 18th century, the whole notion of suicide was very taboo because of this. However, that didn't imply that people weren't thinking about it as much as they could today. They only needed to come up with a workaround to avoid damnation. That manifested itself in murder.
If suicide was incorrect, the answer was to murder someone else, receive a death sentence, and be put to death after atoning for their crimes. Although another person had to die, your soul would still be pure. Suicide was just not an option because there was no time for atonement.
Frequently, the unfortunate victim might be the murderer's or suicide victim's child, or perhaps simply a random person. No one who had committed a crime worthy of execution, for sure. The time-honored Lutheran doctrine held that if a person repented of their crimes and confessed them right before dying, they had no chance of committing those sins again and could look forward to heaven. They therefore believed that taking an innocent life was the correct thing because they were afraid of making a mistake. No comment on whether God considered taking advantage of a doctrinal gap to be a sin or not.