Thirdly, get them to the doctor's office or hospital. There are myriad medical causes of clinical depression and/or suicidal thoughts. A number of conditions, such as thyroid disease, vitamin D deficiency, and possible imbalances in the neurotransmitters of the brain, can cause clinical depression, which can lead to suicidal thoughts. Sometimes, the medications used to treat depression and other conditions can themselves cause suicidal thoughts as a side effect. Furthermore, your friend may be under considerable stress. Stressors are many and varied. They can include relationship difficulties, financial struggles, work/school stress, etc. Having someone, such as a Christian psychological counselor, might be of great help. Other causes to examine might include diet/nutrition, sleep disorders, lack of exercise, lack of social support and many others. A doctor and a psychologist can evaluate for these and other possible causes of the suicidal thoughts. We are spiritual, mental, social and physical creatures, and it is important to treat the whole person. If you really think your friend is going to commit suicide, you might have to call 911. In certain circumstances, a person can be Baker-Acted (held involuntarily, usually for a few days, in order to be evaluated by medical professionals) if they present a serious physical danger to themselves or others. Never take threats of suicide lightly. I am not a doctor or mental health professional so I cannot advise you in particulars. However, I can tell you that you should consult professionals whenever someone you know threatens to commit suicide.
Finally, be there. It can be a frustrating and trying situation for you as well. Make sure you are taking care of your own spiritual needs, and do not allow yourself to be dragged into the pit of depression along with your friend. However, one of the best things you can do is assure your friend that you are there for them. I imagine he/she feels very alone in the world and possibly imagines that no one understands them or really cares about them. They may not think anyone would notice or care if they were gone. Assure them that you care and you are there. Imitate Christ. Love. It may get difficult and you won't do it perfectly, but just being there and letting them know you care may make all the difference in the world to that person. Also, try not to be harsh or judgmental. It is easy to tell people who are seriously depressed to just "snap out of it" or "stop being selfish." However, clinical depression is not something you can just snap out of, and there are many things other than self-centeredness or self-pity that can cause serious depression. There are examples in Scripture and in history of godly men and women who struggled with depression, some to the point of wishing for death (e.g. Job, Jonah, Elijah, Saul, David, Jeremiah). The spiritual giant and Prince of Preachers, C.H. Spurgeon, struggled with serious depression throughout much of his life. However, God's grace is greater than depression, and Christ has conquered death. Unlike the case of the non-believer, for the Christian the sting of death has been removed (1 Corinthians 15:55-57). For Christians, to live is to live through and for Christ, and to die is gain because when we die we are immediately transferred to His direct presence (Philippians 1:21; 2 Corinthians 5:8). Therefore, we do not need to be afraid, but we do need to seek God, who alone is the light that can overcome the darkness of depression. I don't doubt that some cases of depression are the result of Satan's influence in the world (Ephesians 6:12). However, we must always remember that He who lives in us (Christ) is greater than he who is in the world (Satan) (John 4:4). Finally, we must arm ourselves with the shield of faith, be aware and alert for attacks of the Devil, and be constant and persevering in prayer.