Arthur Schopenhauer said this quote

It will generally be found that, as soon as the terrors of life reach the point at which they outweigh the terrors of death, a man will put an end to his life. But the terrors of death offer considerable resistance; they stand like a sentinel at the gate leading out of this world. Perhaps there is no man alive who would not have already put an end to his life, if this end had been of a purely negative character, a sudden stoppage of existence. There is something positive about it; it is the destruction of the body; and a man shrinks from that, because his body is the manifestation of the will to live.