This article presents approximating relations defining energy-optimal structures of the HVAC (Heating, Ventilation, Air Conditioning) system for cleanrooms as a function of key constant parameters and energy-optimal control algorithms for various options of heat recovery and external climates. The annual unit primary energy demand of the HVAC system for thermodynamic air treatment was adopted as the objective function. Research was performed for wide representative variability ranges of key constant parameters: cleanliness class—Cs (ISO5÷ISO8), unit cooling loads —q˙j (100 ÷ 500) W/m2 and percentage of outdoor air—αo (5 ÷ 100)%. HVAC systems are described with vectors x¯ with coordinates defined by constant parameters and decision variables, and the results are presented in the form of approximating functions illustrating zones of energy-optimal structures of the HVAC system x¯* = f (Cs, q˙j, αo). In the optimization procedure, the type of heat recovery as an element of optimal structures of the HVAC system and algorithms of energy-optimal control were defined based on an objective function and simulation models. It was proven that using heat recovery is profitable only for HVAC systems without recirculation and with internal recirculation (savings of 5 ÷ 66%, depending on the type of heat recovery and the climate), while it is not profitable (or generates losses) for HVAC systems with external recirculation or external and internal recirculation at the same time.