Pessimistic thinking about the future is one of the cardinal symptoms of major depression. Few studies have assessed changes in pessimistic thinking after undergoing cognitive behavioral therapy (CBT). A randomized clinical trial (RCT) was conducted with patients diagnosed with major depressive disorder (MDD) to determine whether receiving a course of CBT affects pessimistic future thinking using a future thinking task. Thirty-one patients with MDD were randomly assigned to either CBT (n = 16) or a talking control (TC) (n = 15) for a 16-week intervention. The main outcomes were the change in response time (RT) and the ratio of the responses for positive valence, measured by the future thinking task. Secondary outcomes included the GRID-Hamilton Depression Rating Scale, the Beck Depression Inventory-Second Edition (BDI-II), the Dysfunctional Attitude Scale (DAS), and the word fluency test (WFT). Regarding the main outcomes, the CBT group showed reduced RT for the positive valence (within-group Cohen's d = 0.7, p = 0.012) and negative valence (within-group Cohen's d = 0.6, p = 0.03) in the distant future condition. The ratio of positive valence responses in both groups for all temporal conditions except for the distant past condition increased within group (distant future: CBT: Cohen's d = 0.5, p = 0.04; TC: Cohen's d = 0.8, p = 0.008; near future: CBT: Cohen's d = 1.0, p < 0.001; TC: Cohen's d = 1.1, p = 0.001; near past: CBT: Cohen's d = 0.8, p = 0.005; TC: Cohen's d = 1.0, p = 0.002). As for secondary outcomes, the CBT group showed greater improvement than the TC group regarding the need for social approval as measured by the DAS (p = 0.012). Patients with MDD who received CBT showed a reduced RT for the positive and negative valence in the distant future condition. RT in the future thinking task for depressed patients may be a potential objective measure for the CBT treatment process. Because the present RCT is positioned as a pilot RCT, a confirmatory trial with a larger number of patients is warranted to elucidate the CBT treatment process that influences future thinking. https://center6.umin.ac.jp/cgi-open-bin/icdr_e/ctr_view.cgi?recptno=R000021028, identifier UMIN000018155.