Epictetus words it thusly (Discourses, book I, chapter 24):
>But remember the principal thing, -that the door is open. Do not be more fearful than children; but as they, when the play dues not please them, say, " I will play no longer," so do you, in the same case, say, "I will play no longer," and go; but, if you stay, do not complain. [p. 1081]
>As thou intendest to live when thou art gone out,...so it is in thy power to live here. But if men do not permit thee, then get away out of life, yet so as if thou wert suffering no harm. The house is smoky, and I quit it. Why dost thou think that this is any trouble? But so long as nothing of the kind drives me out, I remain, am free, and no man shall hinder me from doing what I choose; and I choose to do what is according to the nature of the rational and social animal.
(and in book X):
>For to continue to be such as thou hast hitherto been, and to be tom in pieces and defiled in such a life, is the character of a very stupid man and one overfond of his life, and like those half-devoured fighters with wild beasts, who though covered with wounds and gore, still intreat to be kept to the following day, though they will be exposed in the same state to the same claws and bites. Therefore fix thyself in the possession of [virtues]: and if thou art able to abide in them, abide as if thou wast removed to certain islands of the Happy. But if thou shalt perceive that thou fallest out of them and dost not maintain thy hold, go courageously into some nook where thou shalt maintain them, or even depart at once from life, not in passion, but with simplicity and freedom and modesty, after doing this one laudable thing at least in thy life, to have gone out of it thus.
In short: leaving life on one's own terms is fine, provided they are rationally considered (so not on the spur of a moment).
Yes. Seneca writes in one of his letters when you are incapacitated to take care of yourself and are a burden to someone else or your self dignity is under question then you should be prepared to lose your body although you must take care of your body well when you can.
Does Stoicism rationalize suicide?