Yama is also called Dharmaraj. How is death linked to Dharma?
Death is not just a happening once in awhile. Every moment the past is dead, and the present is what life is all about. When you are in the present moment, that is dharma. Death relieves you of your past and brings you to the present moment.