Death is certain, the time and manner is not.
In Twilight of the Idols, Nietzsche wrote:
The invalid is a parasite on society. In a certain state it is indecent to go on living….The highest interest of life, of ascending life, demands the most ruthless suppression and sequestration of degenerating life — for example in determining the right to reproduce, the right to be born, the right to live…. To die proudly when it is no longer possible to live proudly. Death of one’s own free choice, death at the proper time, with a clear head and with joyfulness, consummated in the midst of children and witnesses.
Nietzsche himself died totally insane, staring out the window in his sister’s flat.