Diagnosis and treatment of the patients with major depression (MD) or the combined anxiety and depression (A&D) depend on the questionnaire, sometimes accompanied by tasks such as verbal fluency task (VFT). Functional near infrared spectroscopy (fNIRS) is emerging as an auxiliary diagnostic tool to evaluate brain function, providing an objective criterion to judge psychoses. At present, the conclusions derived from VFT or rest (non-task) studies are controversial. The purpose of this study is to evaluate if task performs better than non-task in separating healthy people from psychiatric patients. In this study, healthy controls (HCs) as well as the patients with MD or A&D were recruited (n = 10 for each group) to participate in the non-task and VFT tasks, respectively, and the brain oxygenation was longitudinally evaluated by using fNIRS. An approach of spectral analysis is used to analyze cerebral hemoglobin parameters (i.e., Oxy and Deoxy), characterizing the physiological fluctuations in the non-task and task states with magnitude spectrum and average power. Moreover, the standard deviation of oxygenation responses during the non-task was compared with the peak amplitude during the task, with the aim to explore the sensitivity of the VFT task to brain activation. The results show that there is no significant difference (p > 0.05) among the three groups in average power during non-task. The VFT task greatly enhanced the magnitude spectrum, leading to significant difference (p < 0.05) in average power between any of two groups (HC, MD, and A&D). Moreover, 40% patients with A&D have an intermediate peak (around 0.05 Hz) in the magnitude spectrum when performing the VFT task, indicating its advantage in characterizing A&D. We defined a rate of the non-task standard variation to the task peak amplitude (namely, SD-to-peak rate) and found that this rate is larger than 20% in 90% of the MD subjects. By contrast, only 40% HC subjects have an SD-to-peak rate larger than 20%. These results indicate that the non-task may not be sufficient to separate MD or A&D from HC. The VFT task could enhance the characteristics of the magnitude spectrum, but its intensity needs to be elevated so as to properly explore brain functions related to psychoses.