There are many things we can do to help a non-Christian friend who is considering suicide. One of the most important things is intercede (pray for them) with God on their behalf. This is no small thing, add-on, or something to do when we have tried everything else. It is the first thing we should do in most situations (I Thessalonians 5:17). In everyday life, what do we do when faced with a situation that is beyond our ability to handle? We call someone stronger, wiser, or better equipped to handle the crisis. That is why we pray. We pray because God is stronger, wiser, and fully equipped to handle any situation. By taking the matter to Him in prayer, we are exercising our faith in Him and our trust that He is able to do above and beyond anything we can do, think, or imagine (Ephesians 3:20). God is our strength, an ever present help in times of trouble. There are no hopeless cases with God because nothing is impossible for God (Luke 1:37). There are many examples throughout history where the persevering prayers of faithful believers have led to the conversion of people who might have been considered hopeless or helpless (e.g. St. Augustine, who was the beneficiary of many years of anguished prayers made by his mother until he was finally converted). The prayers of a righteous man or woman can be extremely effective (James 5:16).
Second, share the good news of the gospel of Christ with them. For those who are lost and do not know Christ, suicide might seem like a rational way to escape the misery of a godless and hopeless life (Ephesians 2:12). If God does not exist, it is easy to imagine how one might fall for a philosophy such as nihilism. To counter this, you must present Christ to them in terms of HOPE. Christ is the way, the truth, and the life (John 14:6). He came that we might have abundant and eternal life (John 10:10). He gives direction and purpose to those who are frustrated with an aimless existence. He gives hope to the despondent soul who is withering in the slough of despair. He provides relief to the soul burdened with the pain and grief of guilt. In short, He is the answer to the questions,
"Why am I here?" and
"Does my life have meaning?" God has answered those questions by providing His Son, who is the purpose and meaning of our lives. Our purpose is to live to glorify the One who died for us. Christ delivers us from the penalty of sin (eternal death) and the power of sin (living here and now in a state dominated by our sinful natures). The wages of sin is death, and for those living under the burden of sin, suicide seems like a way out (Romans 6:23; Matthew 27:5). However, to die without Christ is not to be free from problems, but to increase them (Mark 9:48). There is no returning from suicide. It is appointed once for a man or woman to die and then face the judgment (Hebrews 9:27). Therefore, it is of eternal importance to settle the state of one's soul here and now. There is no reincarnation. There are no second chances, paroles or purgatories. This may all sound very ominous and depressing, but I think it's important to impress upon people who are considering suicide that it will not improve their lot. It will not decrease their pain. Christ, not death, is the key to joy. So, focus on the hope that is offered to those who believe on and receive Jesus Christ as Lord and Savior. Share with your friend what Christ had done in your life. Share how He has given you forgiveness, peace, joy, and life!
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.