Depression is a severe disorder that can be difficult to treat. One approach to treating depression is electroconvulsive therapy (ECT), whereby electricity is administered through electrodes fastened to the patient’s head. This procedure is effective, however not all patients respond. Moreover, ECT can induce side effects, such as memory problems. In addition, even after achieving remission patients are likely to relapse at a later date. Thus, it is important to optimize ECT in terms of treatment effectiveness while minimizing its side effects. A further crucial issue is to prevent relapses by developing effective follow-up treatments. This thesis encapsulates four studies with the following goals: 1) to identify which factors that are associated with the worsening of subjective memory, 2) to identify factors that are associated with remission, 3) to quantify the effect of lithium on relapse after ECT for unipolar depression, 4) to investigate whether the difference in time to relapse between continuation ECT (C-ECT) with medication and medication alone during the first year of treatment changes over 10 years following the end of C-ECT treatment in patients with depression. The studies were performed using the Swedish national register data. The first two studies used the outcomes of subjective memory worsening and remission respectively. The third and fourth studies used time to relapse as the outcome. Several factors were associated with the outcomes: in the first, second, and third studies, it was found that older patients were associated with a positive outcome. In both the second and fourth studies, psychotic depression and not having anxiety disorder were associated with positive outcomes. The third study showed that patients who used lithium were less likely to relapse: the hazard ratio with 95% confidence interval among lithium users compared to non-lithium users was 0.84 (0.75–0.93). The fourth study indicated that the beneficial effect of C-ECT and medication compared with medication alone during the first year post-ECT was maintained for several years. In conclusion, it is important to identify factors that are associated with beneficial treatment, and the studies conducted for this thesis contribute to such knowledge