While studies such as [20] have emphasized their importance in stabilizing microgrid operations and enhancing system flexibility, the integration of electric machines into P2P energy trading and decentralized markets remains poorly understood. This represents a significant research gap, as electric machines play a crucial role in energy generation, storage, and conversion, particularly in systems dominated by renewable energy sources. To address these critical gaps, this paper provides a systematic review of advancements in decentralized energy systems, with a specific focus on P2P energy trading frameworks. The main challenge in this field lies in the lack of a holistic approach that integrates the diverse components of decentralized energy systems--such as optimization models, multi-agent systems, blockchain technologies, and electric machines--into a cohesive framework capable of addressing real-world complexities. Previous works have often focused on isolated aspects of these systems, such as optimizing energy allocation in small-scale microgrids or developing theoretical frameworks for blockchain-based P2P trading. However, they have largely failed to address the interdependencies between these components, particularly in large-scale, dynamic environments where socio-economic, regulatory, and technical factors play a significant role. For instance, while robust optimization models have been proposed to manage uncertainties in energy allocation [9], they often rely on idealized assumptions and lack the real-time adaptability required for practical deployment in P2P trading environments. Similarly, although blockchain and smart contracts have shown promise for secure and transparent energy transactions, their computational demands and energy-intensive consensus mechanisms limit their applicability in resource-constrained settings like microgrids [6]. Furthermore, the integration of electric machines--critical for renewable energy integration and grid stability--has been largely overlooked in the context of P2P energy trading, despite their potential to enhance operational flexibility and resilience [13]. By consolidating findings from 94 high-quality studies across six thematic areas--optimization and modeling in energy systems, MAS and distributed control, simulations and real-world applications, blockchain and emerging technologies, frameworks for robust energy management, and the role of electric machines--this review not only identifies key trends and challenges, but also highlights the underexplored synergies between these areas. Specifically, it emphasizes the integration of electric machines into decentralized systems, a critical yet neglected aspect that can significantly enhance renewable energy integration, grid stability, and operational flexibility. By bridging these knowledge gaps, this work lays the foundation for developing scalable, resilient, and efficient energy management solutions tailored to modern decentralized networks, addressing the limitations of previous studies and paving the way for future research and practical implementations. This paper is organized as follows: Section 2 details the review methodology, Section 3 presents results, Section 4 presents the discussion of the paper, and Section 5 concludes with a summary and future research directions.