The fact you tolerated him for so long makes it worse. He's now using you to vent his frustration with life.
Be assertive, stay away from him for a while. Either he will realize your value to him and restrain himself, or he will continue on to self destruction. If the latter happens, don't let him take you along with him.