I'm writing my own fantasy novel and the way I want it to end is with the villain showing his humanity to the hero, begging for mercy, and when the hero is about to spare him the villains stabs him with his sword. The hero becomes aware that the villain will  never change and with his final breath he stabs the villain back, they both die, their deaths symbolize their duality, they might have similar goals but the way that they want to achieve those goals are completely opposite. Good cannot thrive without evil and evil cannot exist without good, they both go to their eternal sleep as the world is left in piece.

I want to know if this is a good ideia and if there are any good examples of this ideia in execution? Thanks for your help.