Bandgaps and defect-state energies are key electrical characteristics of semiconductor materials and devices, thereby necessitating nanoscale analysis with a heightened detection threshold. An example of such a device is an InGaN-based light-emitting diode (LED), which is used to create fine pixels in augmented-reality micro-LED glasses. This process requires an in-depth understanding of the spatial variations of the bandgap and its defect states in the implanted area, especially for small-sized pixelation requiring electroluminescence. In this study, we developed a new algorithm to achieve two-dimensional mappings of bandgaps and defect-state energies in pixelated InGaN micro-LEDs, using automated electron energy-loss spectroscopy integrated with scanning transmission electron microscopy. The algorithm replaces conventional background subtraction-based methods with a linear fitting approach, enabling enhanced accuracy and efficiency. This novel method offers several advantages, including the independent calculation of the defect energy (Ed) and bandgap energy (Eg), reduced thickness effects, and improved signal-to-noise ratio by eliminating the need for zero-loss spectrum calibration. These advancements allow us to reveal the relationship between the bandgap, defect states, microstructure, and electroluminescence of the semiconductor under ion-implantation conditions. The streamlined analysis achieves a spatial resolution of approximately 5 nm and an exceptional detection limit. Additionally, ab initio calculations indicate gallium vacancies as the predominant defects.