Maranānussati: 'recollection of death', is one of the 10 recollections treated in detail in Vis.M VIII:
Recollection of death, developed and frequently practised, yields great reward, great blessing, has Deathlessness as its goal and object. But how may such recollection be developed?
As soon as the day declines, or as the night vanishes and the day is breaking, the Bhikkhu thus reflects: 'Truly, there are many possibilities for me to die: I may be bitten by a serpent, or be stung by a scorpion or a centipede, and thereby I may lose my life. But this would be an obstacle for me. Or I may stumble and fall to the ground, or the food eaten by me may not agree with my health; or bile, phlegm and piercing body gases may become disturbing, or men or ghosts may attack me, and thus I may lose my life. But this would be an obstacle for me.' Then the Bhikkhu has to consider thus: 'Are there still to be found in me unsubdued evil, disadvantageous things which, if I should die today or tonight, might lead me to suffering?' Now, if he understands that this is the case, he should use his utmost resolution, energy, effort, endeavour, steadfastness, attentiveness and clear-mindedness in order to overcome these evil, disadvantageous things; A VIII, 74.
In Vis.M VIII it is said: 'He who wishes to develop this meditation, should retreat to solitude, and whilst living secluded he should thus wisely reflect: 'Death will come to me! The vital energy will be cut off!' Or: 'Death! Death!' To him, namely, who does not wisely reflect, sorrow may arise by thinking on the death of a beloved person, just as to a mother whilst thinking on the death of her beloved child. Again, by reflecting on the death of a disliked person, joy may arise, just as to enemies whilst thinking on the death of their enemies. Through thinking on the death of an indifferent person, however, no emotion will arise, just as to a man whose work consists in cremating the dead at the sight of a dead body. And by reflecting on one's own death fright may arise... just as at the sight of a murderer with drawn sword one becomes filled with horror. Thus, whenever seeing here or there slain or other dead beings, one should reflect on the death of such deceased persons who once lived in happiness, and one should rouse one's attentiveness, emotion and knowledge and consider thus: 'Death will come, etc.'. Only in him who considers in this way, will the hindrances nīvarana be repressed; and through the idea of death attention becomes steadfast, and the exercise reaches neighbourhood-concentration upacāra-samādhi.
According to Vis.M VIII, one may also reflect on death in the following various ways: one may think of it as a murderer with a drawn sword standing in front of oneself; or one may bear in mind that all happiness ends in death; or that even the mightiest beings on this earth are subject to death; or that we must share this body with all those innumerable worms and other tiny beings residing therein; or that life is something dependent on in-and-out breathing, and bound up with it; or that life continues only as long as the elements, food, breath, etc. are properly performing their functions; or that nobody knows when, where, and under what circumstances, death will take place, and what kind of fate we have to expect after death; or, that life is very short and limited. As it is said: 'Short, indeed, is this life of men, limited, fleeting, full or woe and torment; it is just like a dewdrop that vanishes as soon as the sun rises; like a water-bubble; like a furrow drawn in the water; like a torrent dragging everything along and never standing still; like cattle for slaughter that every moment look death in the face; A. VII, 74.
The Bhikkhu devoted to this recollection of death is at all time indefatigable, gains the idea of disgust with regard to all forms of existence, gives up delight in life, detests evil, does not hoard up things, is free from stinginess with regard to the necessities of life, the idea of impermanence anicca becomes familiar to him; and through pursuing it, the idea of misery dukkha and of impersonality anattā become present to him. Free from fear and bewilderment will he pass away at death; and should he not yet realize the Deathless State in his life-time, he will at the dissolution of the body attain to a happy course of existence; Vis.M VIII.
Maha Thera Nyanatiloka. Manual of Buddhist Terms and Doctrines, Buddhist Publication Society, first edition 1952.