Counterfactual emotions including regret and disappointment play a crucial role in how people make decisions. For example, people often behave such that their decisions minimize potential regret or disappointment and therefore maximize subjective pleasure. Importantly, functional accounts of emotion suggest that the experience and future expectation of counterfactual emotions should promote goal-oriented behavioral change. Although many studies find empirical support for such functional theories, the cognitive-emotional mechanisms through which counterfactual thinking facilitates changes in behavior remain unclear. Here, we leverage computational models of risky decision-making that extend regret and disappointment theory to experience-based tasks, which we use to determine how people learn counterfactual representations of their decisions across time. Further, we use computer-vision to detect positive and negative affect (valence) intensity from participants’ faces in response to feedback, which we use to determine how experienced emotion may influence cognitive mechanisms of learning, reward sensitivity, or exploration/exploitation—any of which could result in functional changes in behavior. Using hierarchical Bayesian modeling and Bayesian model comparison methods, we found that: (1) people learn to explicitly represent and subjectively weight counterfactual outcomes with increasing experience, and (2) people update their counterfactual expectations more rapidly as they experience increasingly intense negative affect. Our findings support functional accounts of regret and disappointment and demonstrate the potential for computational modeling and model-based facial expression analysis to enhance our understanding of cognition-emotion interactions.