"If a Christian commits suicide, can he or she still go to heaven?"
I am assuming that you ask this question because it happened to someone you know. This is a tough question, and I think Christians might reasonably have differing opinions on this. This question hits home a bit also for me, as I talked with someone recently whose brother killed himself. He was a Christian. My friend's take was, "nothing can separate us from the love of God, so I know that he is in heaven now." (See the scripture refenence here)
One cannot deny that in this act a sin has been committed, namely a violation of the sixth of the 10 commandments ("Thou shalt not kill"). Historically many have said that this is a sin of which one cannot repent. For centuries the Eastern Orthodox as well as Roman Catholic Churches denied burial in church yards for persons who took their own life.
In the modern era the churches are generally more nuanced. For example, the current catechism of the Roman Catholic church sounds a more hopeful note: "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." (See here for a full explanation).
I believe that as with anyone who dies, the fate of your loved one or acquaintance is in the hands of God, to whom alone all is known. We believe in a loving God who will weigh all factors perfectly. All we can do for the departed is to commend their souls to God, and offer our prayers and comfort to the surviving family and friends.
Finally, and most importantly, if you are asking because of your own overwhelming depression and despair, and you find that you have plans or impulses toward suicide, then please seek professional help. There should be no shame or stigma to prevent you from this. Do not struggle alone. Your situation is common, and depression can happen even to Godly people. You should pray and rely on God, but I believe that God has placed psychiatrists, and allowed humans to invent medications, as part of his way of helping those who struggle with depression. God be with you.