10+ Suicide Attempts But Still Alive

I know that in Islam suicide is the greatest sin, but what if one has attempted suicide and still lived through it? Is that a sin? I have attempted it in the act of desperation to get out of the pain I was going through