The prevalence of mental health diseases and excessive consumption of anxiolytics has increased in the world. In this scenario, the need arises to determine a model that describes the behavior of pharmacological consumption of anxiolytics in Ecuador, in addition to allowing this general behavior to be projected over time. With a descriptive, exploratory, and non-experimental methodological approach conditioned on obtaining statistical data from official national and international organizations. The population of interest was generalized using flow-type temporal data on the effective consumption of anxiolytics, consisting of 144 monthly records in the period from January 2011 to December 2022. The records represent the proportion of people who consume anxiolytics in relation to the population total available in the statistics of community health care with mental illness disorders of the Ministry of Public Health. In this sense, a viable option is the construction of a temporary SARIMA model. Due to its temporal nature and the management of monthly records, robust estimation was chosen as an option by applying machine learning that efficiently decomposes and extracts both the seasonal and trend components present in the data. Determining the pharmacological consumption of anxiolytics depends on the seasonal factor (months) and the presence of a marked tendency to gradually increase over time, a situation that must be regulated because it represents a situation of drug dependence and overdose. Furthermore, the built model presented adequate suitability when quantifying statistical metrics: RMSE = 5.25% and MAPE = 1%. It is concluded that the proposed model explains the behavior of the consumption of anxiolytics in Ecuador to mitigate situations that occurred in the affected person (anxiety or depression) in the last three months, according to the specification of deterministic and random components identified in the estimated model.