This article proposes a unified solution to address the energy issues in net-zero energy building (ZEB), as a new contribution to earlier studies. The multicarrier energy system, including hydro-wind-solar-hydrogen-methane-carbon dioxide-thermal energies is integrated and modeled in ZEB. The electrical sector is supplied by hydro-wind-solar, combined heat and power (CHP), and pumped hydro storage (PHS). The thermal sector is supplied by CHP, thermal boiler, and electric heating. The hydrogen storage system and Methanation process operate as the interface energy carriers between the electrical and thermal sectors. The carbon dioxide (CO 2 ) of the ZEB is captured and fed into the Methanation process. The purpose is minimizing the released CO 2 to the atmosphere while all the electrical-thermal load demands are successfully supplied considering events and disruptions. The model improves simultaneously the energy resilience and minimizes the environmental pollutions. The results demonstrate that the developed model reduces the CO 2 pollution by about 33 451 kg per year. The model is a resilient energy system that can handle all failures of components. The model can efficiently handle 26% increment in the electrical loads and 110% increment in the thermal loads.