This article from Brain Pickings reviews the book “Stay: The Social Contagion of Suicide and How to Preempt It” whose author shows that suicide is like homicide because once someone commits suicide it is contagious and others suicide. It includes the spike in suicides after the ‘suicide’ of Marilyn Monroe. Discusses historical arguments against suicide.
How to avoid pain is another matter, I don’t know if she goes into that area. Personally, I believe in always challenging yourself and making the effort to get noticed.