Depression comes mostly on failures and disappointments. Someone with severe depression is unable to see the possibility of a good outcome and may believe they will never be happy or things will never go right for them again.
Depression affects a person’s thoughts in such a way that the person doesn’t see when a problem can be overcome. It’s as if the depression puts a filter on the person’s thinking that distorts things.
That’s why depressed people don’t realize that suicide is a permanent solution to a temporary problem in the same way that other people do. A teen with depression may feel like there’s no other way out of problems, no other escape from emotional pain, or no other way to communicate their desperate unhappiness. When depression lifts because a person gets the proper therapy or treatment, the distorted thinking is cleared.
The person can find pleasure, energy, and hope again. But while someone is seriously depressed, suicidal thinking is a real concern.
Here are some helpful suggestions to avoid suicidal situations.
1.Listen, listen, listen. So often, suicidal people feel isolated, disconnected and unimportant. It is crucial to be as nonjudgmental and empathetic as you can. 
2.If you don’t already know, go ahead and ask them if they are feeling suicidal. Asking that question will not make it worse; it will give them permission to talk to you about it.
3.If they are feeling suicidal, ask them if they have a plan. Find out if they have the means to attempt suicide and whether they have thought about when they will make the attempt.
4.If they don’t have a plan, there may not be an immediate crisis, but the person nevertheless has a serious problem that requires professional assistance. Encourage them to seek professional help, and even offer to help them make that first call. 
5.If they do have a plan but are not threatening immediate action, get them to commit to you not to take any suicidal action until they see you again. Again, encourage them to seek professional help and even offer to help them make that first call.
6.If they have a plan and are threatening immediate action, do not leave them alone. Take whatever action is necessary to get them into professional hands. If you have to, take them to the emergency room of the closest hospital.