Rabies and psychopathy are diseases. The prognosis is terminal in both cases, and death would be a mercy. Rabies is also far less harmful than psychopathy, because it results in less collateral damage. After all, psychopathy is responsible for almost every evil you can see in the world today from famine to poverty and war.
Again, there is an argument against the death penalty but protecting psychopaths ain’t it.