The Stoics advised rehearsing in imagination the losses, illnesses and death that may come, so that they would not strike unexpectedly and would be met with reason. Seneca wrote of it often. It is related to the remembrance of death in other traditions.
Premeditation of evils
Praemeditatio malorum: the Stoic exercise of imagining misfortunes in advance, to lessen their power.
Also: praemeditatio malorum