Imagine a person with leprosy, in the days before the invention of dapsone. This person has done nothing wrong to contract leprosy; nevertheless, there are certain precautions that this person could take to avoid transmitting the disease to others: namely, isolation. This person does not in any sense deserve either leprosy or isolation; nevertheless, the morally right thing to do is for this person to voluntarily isolate herself away from those who have not contracted the disease, including her own family and friends.
Similarly, although a potential suicide has done nothing wrong to be born, and although, I argue, the action of committing suicide is not morally wrong, the suicide can limit the harm his suicide will cause to those close to him by voluntarily isolating himself prior to committing suicide, just like the person with leprosy.
The suicide of one's spouse or lover is much more devastating and personally affecting than the suicide of one's former spouse or lover. While the latter may be painful and induce unpleasant feelings on the part of the surviving ex-lover or ex-spouse, it has much less chance of producing the shock and despair that are often the result of the suicide of one's current spouse or lover. Given this clear differential of harm, I think a suicide owes a duty to his lover or spouse to end the relationship well prior to committing suicide.
This rationale also holds true for one's friends. The suicide of a close friend is bound to be traumatic; however, the suicide of a former friend to whom one hasn't spoken in years may barely affect one at all, beyond prodding some interesting reflection on life and mortality. Suicides should think carefully about ending close social relationships well ahead of the act in order to lessen the harm the act may cause.
Family relationships may not, as a practical matter, be ended. I am not sure what can be done to lessen the pain of one's suicide to one's relatives. My own informal study of news reports of various suicides seems to indicate, however, that family members are most accepting of the suicide of a close relative when they were aware of the suicidal person making a great effort to live during his life. The suicide of a person who "tried everything," who struggled mightily during his life, and whose desire to die was obvious for a long time, seems to be less emotionally devastating to his family than a suicide that the family perceives as impulsive or random.
Finally, if a person decides conclusively to commit suicide, it is morally imperative to end any therapeutic relationship with a psychologist or psychiatrist, leaving as long an interval as possible between the end of the therapeutic relationship and the suicide. First, it is hard to imagine a therapist not feeling responsible for the death of his patient, whereas a former therapist may not hear of the suicide at all, and if he does, will likely feel less responsible for the death. Second, the suicide must recognize that his therapist may actually be sued by his survivors for failing to prevent his suicide. Someone who commits suicide months or years after formally ending the therapeutic relationship will not put his therapist in this troubling situation.