Be with your friend like a shadow and encourage him to not do so, tell him the side effects. Get him engaged in other activities like sports or gym.
Advice him to stay busy throughout the day.
If need be involve elders.
Rehabilitation is also a way to seek professional intervention.