Let’s first define what the Church’s teaching on the death penalty is.
The Church continues to uphold its traditional teaching that the state has the right and duty to protect general society from violent offenders, including by means of the death penalty if non-lethal means are insufficient to protect lives in an individual case. What the Church strongly encourages today is that the state do all that it can to satisfy its duty to protect society through non-lethal means, which are in better conformity to the human dignity of the offender and prevent the state from growing callous and imprudent in its application of the death penalty. It also prevents society from developing the "hang ’em high!" attitude that is unfortunately all too prevalent in countries that permit widespread use of the death penalty.
As for scriptural support for the Church’s modern pastoral approach to the death penalty, we can look to God’s mercy on murderers such as Cain and King David (cf. Gn 4:1–16, 2 Sm 12) as examples of extending mercy to those who, by reason of their crimes, could justly have been put to death.