Suicide is sin of murder i.e. mortal sin. Unconfessed mortal sin is one way ticket to hell. Thus suiciders are in hell.
However, Church always have three special cases. First is grace of repentance. Many who wanted to commit sucide but failed said that moment they jumped of the bridge or whatever they realised what they had done and repented. So we have hope.
Second is case of Razis. In which suicide is still malum, evil, but it's culpa, guilt, may be dismissed becuase of circumstances.
And there is Samoson case, where one killing himself is but double-effect, "accident during work" so to speak.
This is teaching of Church in this matter.