According to most scholars, while Greek writers and philosophers did not believe that suicide would lead to a better existence, they did regard it as an appropriate response to certain situations.
For example, Jocasta’s suicide at the conclusion of the drama, Oedias did seem an appropriate response to a disastrous situation.
Through the voice of Socrates, Plato stated the classical attitude towards suicide in the Phaedo. Humans are in prison and in the body as a possession of the gods and cannot free themselves. Only God can free them.
The act of suicide is an act against the gods. Pythagoras, slightly earlier, had forbade suicide unless ordered by their commander God.