First, this is not about dealing with suicidal people. Socially withdrawal might be a symptom of depression, but not all social withdrawal is caused by depression. Dealing with people suffering with either one is already considered off topic in this site.
Second, I've edited the question to limit dealing with friend that suddenly withdraw, but still allow occasional meeting with close friends and relatives, but refuse going out or participate in social activity.
Can you give me insight what can I improve from my answer?