Q. My mother was terminally ill, it was a matter of time according to the doctors. …
We were also told that every effort should be made to extend the life of a person, since even a short lapse of time is enough for a person to do teshuvah, does that apply to someone who is unconscious or suffers from dementia and is suffering?
A. Maintaining the life of a person is not necessarily a function of the individual's capacity or ability to do teshuva. Our Torah teaches us that life is a gift and it is not our prerogative to terminate it at will (Avos 4, 22), regardless of whether someone is unconscious or suffers from dementia.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit"a