With out knowing what your friend did that put your life in jeopardy it is hard to tell you what you should do. If your friend is involved in illegal activity you should turn them in. If your friend is on drugs then you should try and help them. If your friend did it for fun and games and has no excuse then maybe you should talk to them and find out why they are behaving this way.
Ok here's what you do you try to help them try to talk to him/her unless there going to hurt you or another person if so, you have to go tell someone quick before they go and do something stupid and ruin your life too or get you started in the same rhomg