People’s belief in their own value is contingent on being able to desire to survive and to avoid injury more than anything else. But they can sometimes desire other things more.
Someone who desires to avoid pain or indignity may desire it more than anything else and may commit suicide when they believe that suicide is the only way to fulfil their desire to avoid them. In this kind of situation, their belief in their own value is shut down and they do no wrong.
One of the oddities of evolutionary intuitionism is that we are not morally obligated not to kill someone who does not value themselves. But we should not expect a naturally selected morality to have the precision that philosophers often demand. What matters is not whether it is perfect but whether it is good enough. It does not follow that we can kill suicidal people. Often there is a period of time when the desire to commit suicide competes with the desire to continue living. We can be sure that suicidal people have ceased to believe that they are of value only when they are actually committing suicide. Hence, there is seldom a real window of opportunity in which we are free to kill the suicidal.
Physicians can assist people who want to die. Providing the means to commit suicide is not always wrong because suicide is not always wrong. Also, it is permissible to accelerate the process when someone is actually attempting to commit suicide.
The problematic cases are those in which someone desires to die but cannot kill themselves even when provided with the means to do so. But people can specify in advance the conditions under which they would want to die. If they do so and if the specified conditions exist, it is reasonable to infer that they have a desire that is stronger than their desire to survive, in which case it would be permissible to bring about their deaths. It would also probably be permissible when people have not specified the conditions but the conditions that obtain are ones such that many reasonable people have specified that they would be want to die if they obtained. So medical assistance in dying is permissible in principle, although there can be practical difficulties when it comes to deciding whether the conditions of permissibility really obtain.