As students’ affective states can differ between learning that occurs in traditional classrooms when compared with learning that takes place in extended reality and immersive learning environments, it is important to examine the role of affective computing. Therefore, this study aims to provide an overview regarding the use of affective computing in the context of augmented reality, virtual reality, and immersive learning environments and the metaverse. Hence, it examines and presents the state of the art through a review and bibliometric analysis of 188 documents of the existing literature from Scopus and Web of Science (WoS) from 2005 to 2023. The study follows the Preferred Reporting Items for Systematic reviews and Meta-Analyses (PRISMA) statement to identify and select relevant to the topic documents. In addition to the analysis of the existing literature, emerging topics and themes are identified and future research directions are presented. The significant role of affective computing within augmented reality and virtual reality environments arose. Their ability to offer engaging and interactive learning experiences while also being able to recognize, monitor, and respond to students’ affective states and to consider their emotions, personalities, characteristics, knowledge, and preferences to provide adaptive and personalized learning was evident. Additionally, their potential to enrich educational activities, increase learning outcomes, and support special education emerged. When augmented reality, virtual reality, and immersive learning environments capitalize on affective computing, meaningful learning can occur and self-regulated learning can be promoted.