I've been reading Hume's essay 'On Suicide', where he tries to dispel the notion that suicide is a sin in the eyes of the Christian God. His argument seems to run (very roughly) like this:
People claim that suicide is a sin because it unnaturally counters God's will for us.
They say it counters God's will for us because only God can take human life and death into His hands.
But when we act to unnaturally preserve our life with medicine, we're not sinning.
Moreover, God causes the situations in life that make us want to commit suicide in the first place.
Therefore suicide does not inherently counter God's will and is not automatically a sin.
This aligns pretty well with my long-standing suspicion of claims that modern science and medicine is somehow 'unnatural'. If you're going to call human artifice unnatural, you've got to call all animal artifice unnatural, including bird nests and anthills, or justify a meaningful distinction between human and animal artifice.
Still, I find I prefer Schopenhauer's argument for why suicide is morally permissible (that we have ultimate rights to our own body; and that suicide is inherently and obviously a brave act.) It's a delight to read, like Hume's argument, but only deals with religion at the very end when it tries to explain why Christians decry suicide as a terrible sin.
'Modern' Christianity - or 'weak Christianity', Kierkegaard's false 'Christendom' - poses a loving God and a world that is essentially benevolent. Suicide is the ultimate refutation of that position, a person's whole life put behind the claim that the world is harsh and unfair. This, Schopenhauer says, bothers followers of the One who looked down at the world and "saw that it was good".