The act of suicide is sin, because it's taking something that is strictly under God's commandments (life and death) and subjecting it to our own will. It robs a person of the amazing gift of life given to them by God alone.
"For you created my inmost being; you knit me together in my mother’s womb." - Psalm 139:13
More importantly the mental attitude and thought process of someone who commits suicide is certainly sinful. It is always based in a selfish thought process.
This is considered sinful because it is the purest form of unbelief in the promises of God. The general thought process of a suicidal person is incredible selfish and recognises that they do not believe God can help them. They believe no one can help them.
Let me ask you this question. Does a true child of God show fruits of suicide? God certainly has mercies on those who can't make choices for themselves, but ultimately, those with a self-destructive behaviour or a debased mind as described in Romans 1:28 are ultimately choosing selfishness over God.
Mark 5:2-5; Ephesians 5:29 note that “no one ever hated his own flesh”, such behavior reveals that those who are suicidal have zero faith in Christ. God has made Himself very clear: “the unrighteous will not inherit the kingdom of God” (1 Corinthians 6:9-10), the “unbelieving” go to the lake of fire (Revelation 21:8)
Suicide is only mentioned in the Bible six times. Abimelech (Judg. 9:50–57); Samson (Judg. 16:28–30); Saul (1 Sam. 31:1–6; 2 Sam. 1:1–15; 1 Chron. 10:1–13); Ahithophel (2 Sam. 17:23); Zimri (1 Kings 16:18–19); and Judas Iscariot (Matt. 27:5; Acts 1:18–20).
We know all too well that works performed outside of God are sin. If you believe this to be true, the deaths depicted in these texts can be quickly and easily explained away as sinful, or as righteous (as we see in Samson's example).