I quoted from Montaigne's essays, here is the relevant passage;
QuotePhilip having forcibly entered into Peloponnesus, and some one saying to Damidas that the Lacedaemonians were likely very much to suffer if they did not in time reconcile themselves to his favor: “Why, you pitiful fellow,” replied he, “what can they suffer who do not fear to die?” It being also asked of Agis, which way a man might live free? “Why,” said he, “by despising death.” These, and a thousand other sayings to the same purpose, distinctly sound of something more than the patient attending the stroke of death when it shall come; for there are several accidents in life far worse to suffer than death itself. Witness the Lacedaemonian boy taken by Antigonus, and sold for a slave, who being by his master commanded to some base employment: “Thou shalt see,” says the boy, “whom thou hast bought; it would be a shame for me to serve, being so near the reach of liberty,” and having so said, threw himself from the top of the house. Antipater severely threatening the Lacedaemonians, that he might the better incline them to acquiesce in a certain demand of his: “If thou threatenest us with more than death,” replied they, “we shall the more willingly die”; and to Philip, having written them word that he would frustrate all their enterprises: “What, wilt thou also hinder us from dying?” This is the meaning of the sentence, “That the wise man lives as long as he ought, not so long as he can; and that the most obliging present Nature has made us, and which takes from us all color of complaint of our condition, is to have delivered into our own custody the keys of life; she has only ordered, one door into life, but a hundred thousand ways out. We may be straitened for earth to live upon, but earth sufficient to die upon can never be wanting, as Boiocalus answered the Romans.” Why dost thou complain of this world? it detains thee not; thy own cowardice is the cause, if thou livest in pain.