Some people who have committed suicide have gone to Heaven and some have gone to hell. Here's why:
No human is perfect. We all sin. Even if we are a "good person" compared to other people, we are still all sinners and not perfect. Suicide is a sin just like lying, disobeying your parents, hatered, murder, etc. These are only a few sins; there are many more. Every single human has sin inside of them.
Well, the bible says that God is perfect, and Heaven is a perfect place for perfect beings. No sin can enter Heaven, it just can’t. God is perfect and has to be separate from sin. That would be bad news for us humans, because all of us have sin in us, so we would have to be forever separated from God/Heaven. If our sins are separating us from God and Heaven, we would have to go to hell forever when we die to pay the punishment for our sins because we aren't powerful enough to get rid of our sins on our own. We would all have to pay for our sins forever in hell.
BUT- God loves us so much that He didn't want to be separated from us forever. He didn't want us to go to hell. When we strayed away from Him (sinned), He had a plan to bring us back. He sent His Son, Jesus, from Heaven to Earth to take our sins away. Jesus took all of our sins upon Himself and was willingly tortured and killed on the cross to take the punishment for our sins. He paid the penalty for us so we wouldn't have to pay it forever in hell. The, three days later, God raised Him from the dead- defeating sin!
Having your sins taken away and paid for by Jesus is a free gift. Just like with any gift, we have to accept it. If a friend buys you a gift and you don't accept it, you don't get the gift, right? Jesus' gift of being saved from our sins is the same way, we have to receive Him! Remember that this is a FREE gift, so we can't work for it, deserve it, or earn it. You just have to accept what Jesus already did to take them away. You can do that (well, really it's God doing it through you) by believing that He did this for you and then repenting once and for all. The word "repent" means "change of mind"- so basically, you are changing your mind to know that sin is bad and should be avoided and that you want God's way instead. Then, you are saved from sin once and for all no matter what and are going to Heaven. Nothing can ever separate you from God ever again, not even suicide.
So, if someone had been saved from sin before they committed suicide, yes they would still have gone to Heaven. Once you are saved, you are saved even from the sins that you haven't done yet. However, that doesn't mean that suicide is a good idea, and please get help immediately if you are considering it (though it sounds more like you've lost someone to suicide, in which case I'm very sorry for your loss). I can't tell you for sure if the person who you lost went to Heaven or hell, because I didn't know them to know if they were saved. You'd probably know because they probably would have talked about being saved from sin and being born again ("born again" means that your old sinful spirit is gone and God has put His spirit in you). But, I can't tell you for sure because its not my place to judge who is saved and who isn't.
Please send me a message if you ever need to talk.