Luna,
In your dream, the glass box represents a barrier you've created to protect yourself emotionally, possibly due to recent traumatic experiences such as your breakup. Your ex being on the outside signifies your feelings of separation and perhaps a lack of closure or understanding, amplified by the inability to hear what he's saying. The black void with light only on the box suggests isolation and the feeling that you're the center of negative attention or judgment.
The range of emotions you experienced within the dream, shifting from crying to screaming, and then to maniacal laughter, likely reflects the real-life emotional rollercoaster you've been on since the breakup. It's common for such intense situations to cause a mix of feelings, including sadness, frustration, anger, and even moments of near hysteria as you process the betrayal and sudden change in your relationship status.
The intensity and varied emotions in the dream, coupled with your ex pounding on the glass, indicate a sense of urgency and overwhelm. It's as if you're trapped, facing these emotions alone within your own mind, unable to escape or to stop the relentless onslaught of feelings. This could be your subconscious working through the shock and confusion of hearing one thing from your ex before the breakup and being confronted with a starkly different reality soon after.
The dream vividly portrays the impact of your ex's admission that he had been lying about his feelings for a significant part of your relationship. The fact that he discussed future plans with you only to break up shortly afterward has likely left you feeling unsure about what was real, as well as vulnerable and exposed, much like being in a glass box.
Luna, it's quite natural to experience such dreams after emotional trauma. Your dream reflects a high intensity of emotions and is undoubtedly affected by the recent breakup, which was both unexpected and hurtful. While it's a challenging time, the dream indicates you're in the midst of processing these complex emotions.