My Christian wife is dying and the doctor has prescribed morphine and tranquilizers. She is losing her mind and the drugs may be contributing to that. I don't want her to suffer but I also don't want her mind to be in a bad state for rebirth. Is there any Buddhist scripture or comentary that could give guidance in this situation?
This is not exactly "Buddhist scripture or commentary" but it's related -- What nurses need to know about Buddhist perspectives of end-of-life care -- here's an extract but you might read it all:
Taking into consideration overall well-being (including the mental state of the patient), nurses must balance the level of pain relief needed against the need for alertness in the dying Buddhist. Proper pain management can be achieved with minimal disruption of alertness by the use of the WHO analgesic ladder. The choice of non-opioid analgesics (nonsteroidal anti-inflammatory drugs) and weak opioids should be preferred over strong opioids and neurolytic block therapy whenever possible, with the aim of reducing adverse side effects (i.e. sedation and cognitive impairment), thus maintaining alertness of the individual so that effective spiritual practices may continue. However, if severe uncontrolled pain develops, cognitive impairment (e.g. delirium) may result that may require the use of strong opiods for effective relief to achieve the best cognitive function possible that would support meditative spiritual practices. In concordance with good practice and recognizing that the individual needs of each patient will differ, nurses should continue to monitor the need for pain relief, and should clearly document the preferences of such patients with regard to pain relief, particularly during initial patient assessment regardless of the setting (patient’s own home, hospice, hospital).
I believe the "analgesic ladder" means, not prescribing more than needed, and, increasing the prescription over time (when the need/illness increases, and as the tolerance to the drug increases, tolerance making it less effective) -- additional details here: WHO Analgesic Ladder
For some patients I think that unmanaged pain and suffering itself, may cause a "mind to be in a bad state" -- for example delirious or suicidal.
This article -- Ministering to the Sick and the Terminally Ill -- includes a lot of sutta references.
One of these is AN 5.124 which identifies qualities of a competent carer -- they include being able to prepare medicine and knowing what's suitable and unsuitable.
A patient with five qualities is easy to care for. What five? They do what is suitable. They know moderation in what is suitable. They take their medicine. Because their carer wants what’s best for them, they accurately report their symptoms by saying when they’re getting worse, getting better, or staying the same. And they can endure physical pain—sharp, severe, acute, unpleasant, disagreeable, and life-threatening. A patient with these five qualities is easy to care for.”