It's a shame when piety lacks heart (4)
I believe the answer is:
pity
'it's a shame' is the definition.
(both are expressions of regret or sorrow)
'piety lacks heart' is the wordplay.
'lacks heart' means to remove the middle letters (I've seen 'lacking heart' mean this).
'piety' with its centre removed is 'PITY'.
'when' acts as a link.
(Other definitions for pity that I've seen before include "Cause for regret" , "Sympathise with" , "Sympathy for the suffering of another" , "Feel sorrow for" , "Feel compassion for" .)