Entirely, yes. Someone with a condition such as dissociative personality disorder committing a murder is very different to someone devoid of proper emotions choosing to kill someone. The former, I believe, should never warrant execution, as their condition could be the primary factor as to why they committed the act: driven to kill by some paranoid or otherwise untoward impulse. The other case, killing someone just for fun/in the act of another crime, shows a cruelty behind the killing, and puts it in an entirely different light; in a case such as this, I can see why execution could be suggested, despite being against the death penalty as a rule.
Either way the person should be locked up due to the danger they pose to society, of course. I don't think diminished responsibility is by nature something that should allow a defendant to receive less harsh of a punishment, though. If they're someone with a learning disability, and they were pressured or coerced into the crime, then that could be seen as a situation where they have potential to be a model citizen after their punishment and, hopefully, rehabilitation (something the prison system needs to focus more on to be entirely effective). But if they are dangerous due to the nature of their mental illness and could snap at any time, then the danger posed to society is too high.
So imo, "diminished responsibility" is most important when dealing with murder cases in areas of the world that utilise capital punishment, as it seems barbaric to execute someone who is mentally ill due to actions that they did not have full control over. Of course protecting society is of the utmost importance, but not at the expense of decency and care, even for those who are driven by one means or another to create great harm.