Heya, I just stumbled upon this Buddhist story about a man who took his own life, yet Buddha himself has deemed him liberated from the cycle of rebirth.
The man(Godhika) has achieved a temporary freedom of heart's desires through meditation, but this state of mind kept slipping away from him, so in despair he decided to use a knife to make it more well "permanent" :3
Yet his act was not condemned in the story, on a contrary, Godhika was praised for freeing himself and gaining "unestablished consciousness" so Mara(God of illusion and rebirth) couldn't find him and entrap him after his death(by suicide).
Hope this brings you all some hope and comfort
Early Buddhist texts from the Tipitaka (Tripitaka). Suttas (sutras) with the Buddha's teachings on mindfulness, insight, wisdom, and meditation.
suttacentral.net