I wouldn’t call it a sin. My cousin killed himself, he was severely bipolar, he was a sick man. He was a successful man, had a family and a wife, but he was sick. He went off his meds, he spiraled, he had constant physical pain from an injury that added to his depression. It was a very tragic event, but he wasn’t in a clear state of thought, he was sick. Horrible thing, but not a sin, he was not competent enough to make rational decisions.
God is the judge. He knows all the details. Sometimes we think we do, but we really don’t.