There's actually a term for this known as " Guilty but Mentally Ill (GBMI)", although not sufficiently mentally ill so that he(she) can not be held accountable for his(her) actions, refers to a verdict of guilty but mentally ill is equal to a guilty verdict. It refers to perpetrators whose mental illness is insufficient to be free from criminal responsibility.