Anyone personally contemplating suicide should seek help and if you know someone else thinking of such they should be referred to help immediately.
The Catechism of the Catholic Church has a section on Suicide but I don’t have my Catechism with me to quote it for you now.
I do know 2282 and 2283 and one must think of the conditions necessary for a mortal sin as well.
2282 If suicide is committed with the intention of setting an example, especially to the young, it also takes on the gravity of scandal. Voluntary co-operation in suicide is contrary to the moral law.
Grave psychological disturbances, anguish, or grave fear of hardship, suffering, or torture can diminish the responsibility of the one committing suicide.
2283 We should not despair of the eternal salvation of persons who have taken their own lives. By ways known to him alone, God can provide the opportunity for salutary repentance. The Church prays for persons who have taken their own lives.