Rami Malek has revealed what working on his new revenge thriller, The Amateur, taught him about grief.