Coronavirus disease (COVID-19) is one of the world's most challenging pandemics, affecting people around the world to a great extent. Previous studies investigating the COVID-19 pandemic forecast have either lacked generalization and scalability or lacked surveillance data. City administrators have also often relied heavily on open-loop, belief-based decision-making, preventing them from identifying and enforcing timely policies. In this paper, we conduct mathematical and numerical analyses based on closed-loop decisions for COVID-19. Combining epidemiological theories with machine learning models gives this study a more accurate prediction of COVID-19's growth, and suggests policies to regulate it. The Susceptible, Infectious, and Recovered (SIR) model was analyzed using a machine learning model to estimate the optimal constant parameters, which are the recovery and infection rates of the coupled nonlinear differential equations that govern the epidemic model. To modulate the optimized parameters that regulate pandemic suppression and mitigation, a systematically designed feedback-based strategy was implemented. We also used pulse width modulation to modify on-off signals in order to regulate policy enforcement according to established metrics, such as infection recovery ratios. It was possible to determine what type of policy should be implemented in the country, as well as how long it should be implemented. Using datasets from John Hopkins University for six countries, India, Iran, Italy, Germany, Japan, and the United States, we show that our 30-day prediction errors are almost less than 3%. Our model proposes a threshold mechanism for policy control that divides the policy implementation into seven states, for example, if Infection Recovery Ratio (IRR) >80, we suggest a complete lockdown, vs if 10