A court has heard how Gavin Shaw was driven by 'resentment' to kill his ex-wife after learning she had a new relationship