There are two things we can say for certain when it comes to suicide and eternal security for believers in Jesus. First, suicide is a sin. It is rebellion against God and an active rejection of His stated will. Meaning, it is morally wrong. Second, suicide does not disqualify a Christian from entering heaven. It is not a "mortal sin," to use the vocabulary of the Catholic church.
Those two truths provide all the guiderails we need to discuss this difficult but important topic.
How do we know that suicide is a sin? Because of God's Word.
Consider:
- "You shall not murder" (Exodus 20:13).
- "For the commandments, 'You shall not commit adultery,' 'You shall not murder,' 'You shall not steal,' 'You shall not bear false witness,' 'You shall not covet,' and if there is any other commandment, are all summed up in this saying, namely, 'You shall love your neighbor as yourself' " (Romans 13:9).
- "For this is the message that you heard from the beginning, that we should love one another, not as Cain who was of the wicked one and murdered his brother. And why did he murder him? Because his works were evil and his brother's righteous" (1 John 3:11–12).
Other than the limited exceptions of capital punishment and self-defense (including just war and soldiers in combat), the Bible consistently teaches that ending a human life is wrong. That includes your own life, which means suicide is a sinful action. Ending our own lives is wrong because it fails to recognize both the gift and responsibility given to each of us—a gift that is wrapped up in the preciousness of life.
Even so, Scripture is also clear that Jesus' death on the cross paid the penalty for all our sins. His blood washes us whiter than snow (Psalm 51:7). 
Therefore, anyone who has received God's grace through faith need not fear that a moral failure will disqualify them from eternal life. We are eternally secure.
As Jesus told us, "My sheep hear My voice, and I know them, and they follow Me. And I give them eternal life, and they shall never perish; neither shall anyone snatch them out of My hand" (John 10:27–28).
----
If you are struggling with thoughts of suicide, please don't face them alone. Help is available right now. In the United States, you can dial 988 to speak with someone from the 
Suicide & Crisis Lifeline who can help 24/7.