Self-control plays a pivotal role in pursuing long-term goals related to health and financial well-being. While ample evidence suggests that humans are prone to occasional self-control lapses, little is known about how changes in emotional and attentional states affect the ability to maintain self-control. In two studies (N1 = 109 and N2 = 90), we used emotion recognition software to decode participants' facial expressions while manipulating their attentional and emotional states during a Psychomotor Vigilance Task (PVT) before exerting self-control in a subsequent task. Our findings reveal dissociable roles of attention and valence in maintaining self-control, depending on the distinct demands of the task. Specifically, performance in a subsequent cognitive task was predominantly associated with changes in attentional states during the PVT rather than valence. Conversely, preferences in a subsequent social task were associated with changes in valence states during the PVT, while attention showed no effect. This dissociation between attention-invoked and emotion-invoked lapses in self-control holds significant implications for psychological and economic models of self-control, ultimately contributing to the development of policies to mitigate the detrimental consequences of individual self-control lapses.