I'd have to say that a considerable part of the rationale behind it would be that the Christian church would excommunicate anyone who attempted to commit suicide. In the 5th century, St. Augustine, in his The City of God, condemned suicide due to his interpretation of the sixth commandment:
God's command "Thou shalt not kill," is to be taken as forbidding self-destruction, especially as it does not add "thy neighbor", as it does when it forbids false witness, "Thou shalt not bear false witness against thy neighbor". (Book I, Chapter 20)
In 693, the Sixteenth Council of Toledo ruled that attempted suicide was punishable by excommunication. These views were further backed in the 13th century by St. Thomas Aquinas in his Summa Theologica:
It is altogether unlawful to kill oneself, for three reasons. First, because everything naturally loves itself, the result being that everything naturally keeps itself in being, and resists corruptions so far as it can. [...] Hence suicide is always a mortal sin, as being contrary to the natural law and to charity. Secondly, because every part, as such, belongs to the whole. Now every man is part of the community, and so, as such, he belongs to the community. Hence by killing himself he injures the community [...]. Thirdly, because life is God's gift to man, and is subject to His power, Who kills and makes to live. Hence whoever takes his own life, sins against God [...].
Excommunication for suicide is now uncommon.
It should be noted that evidence of suicide penalization existed before this; for example in Ancient Greece. In Book IX of the dialogue Laws, Plato states:
They who meet their death in this way [via suicide] shall be buried alone, and none shall be laid by their side; they shall be buried ingloriously in the borders of the twelve portions the land [in the outskirts of Athens], in such places as are uncultivated and nameless, and no column or inscription shall mark the place of their interment.
In modern times, while most countries have abolished their laws on the criminalization of suicide (e.g. the United Kingdom, South Africa, and Canada), some have kept or instated laws to criminalize it. To name a few:
As an example for someone put to death for attempting suicide, in the book The Savage God: A Study of Suicide by A. Alvarez, the author discusses a case in 1860 of a British man hanged for trying to commit suicide by slitting his throat. I can't find any news stories regarding more modern cases; however, there are reports of imprisonment of Ghanaians and Ugandans for attempting suicide (for example, this one).
I hope this helped. :)
For clarification, are you talking specifically about Great Britain where suicide was illegal until 1961 or more generally?