With the increase in electricity supply from clean energy sources, electrochemical reduction of carbon dioxide (CO\textsubscript{2}) has received increasing attention. However, a first-principles model for electrochemical CO\textsubscript{2} reduction has not been fully developed because of the complexity of its reaction mechanism. Moreover, the electrochemical CO\textsubscript{2} reduction process is catalyzed by a fast-deactivating copper catalyst and undergoes a selectivity shift from the product-of-interest at the later stages of experiments. Thus, machine learning (ML) techniques are employed, which demonstrated the ability to capture the dynamic behavior of a chemical process from data. We propose a machine learning-based modeling methodology that integrates support vector regression and first-principles modeling to capture the dynamic behavior of an experimental electrochemical reactor. This model is employed to predict the evolution of gas-phase ethylene concentration. The model prediction is used in a proportional-integral (PI) controller that manipulates the applied potential to regulate the gas-phase ethylene concentration at energy-optimal set-point values computed by a real-time process optimizer. Lastly, suitable compensation methods are introduced to further account for the experimental uncertainties and handle catalyst deactivation.