Bava Batra 135 - A Will Written by a Seriously Ill Person is Invalid

If a person dies and a sickbed will is found tied to his thigh, so that there is no suspicion of forgery, the will still has no legal validity.

Unless a formal act of acquisition was made before the person's death, his property automatically passes to the rightful heirs defined by the Torah. The Sages, however, decreed that a seriously ill person be able to transfer his property to others by verbal declaration alone. They did it out of concern that a seriously ill person, fearing that his end was near, might deteriorate further if he were unable to arrange his affairs. Thus, his words take effect, and the gift takes effect upon his death.

This person, who prepared a will, did not use the verbal declaration method above, and after his death neither he nor his documents can effect acquisitions.

Art: Edvard Munch - The Sick Child