The COVID-19 pandemic began as a health problem which has also mutated into an economic, social, and psychological problem. Millions of victims required intensive care and many died. Furthermore, the pandemic has almost paralyzed the economy, impacted social life, and increased the number of people experiencing various psychological problems. Various efforts to overcome those problems have been implemented. However, optimism, a significant psychological dimension of coping, is arguably required to ensure that these efforts do not diminish. This study develops a contextual model of optimism by identifying collective coping and closeness to God as variables that have a direct impact on optimism. Meanwhile, individual preventive efforts are located as an antecedent to collective coping, but do not directly impact optimism. Data for the study were collected through online surveys during the pandemic with 544 respondents. The results of the data analyses showed that they fit the theoretical model developed. Individual preventive efforts influences optimism through collective coping. Furthermore, collective coping and closeness to God have direct effects on the emergence of optimism. This optimism model indicates the importance of collective efforts as a part of the drive to end the pandemic. Individuals also need spiritual strength to remain optimistic. Both must be present, in parallel with individual preventive efforts, as is often suggested by policymakers.