Cancer diagnosis and treatment are often accompanied by significant psychological stress, depression, and anxiety. These mental health issues can severely impact a patient's quality of life and may also interfere with the effectiveness of cancer treatments. Sertraline is sometimes prescribed to cancer patients to manage these mental health conditions.