PURPOSE: This randomized clinical trial is studying the side effects of escitalopram and to see how well it works compared to a placebo in treating depression in patients with advanced lung or gastrointestinal cancer.