Such a timely phenomenon in the modern world as digitalization can become a tool for achieving sustainable development goals. But it is new, and its benefits and threats are not well understood. This problem can be partially solved by creating economic and mathematical models for assessing the impact of digitalization on sustainable development. Nonetheless, most of the existing models in this field are devoted to defining the impact of digitalization on the economic aspects of countries' activities, and environmental ones are either ignored or presented approximately, with significant abstraction. Despite this, the objective of the paper is to develop and implement an economic and mathematical model, which in a generalized form can be used for different countries of the world, subject to its certain adaptation and detailing of national indicators. This approach allows to take into account the difference in the social and economic situation of countries and levels of their digitalization, which makes it possible to draw more valid conclusions based on the results of estimations. The proposed model is built on the basis of the system dynamics method, which takes into account the path-dependence, and is implemented on the example of Ukraine. With its help, two computational experiments were carried out: an inertial one (a forecast for 5 years, provided that all the current patterns of digitalization of the country's economy are preserved) and a scenario, in which patterns of investing in digital capital in Ukraine change (to the patterns of European countries - Spain and Hungary), while maintaining the rest conditions unchanged. Using this model, it was defined that digital equipment and technologies as part of the environmental capital of the Ukrainian industry, as well as non-digital equipment and technologies, have an extremely small impact on reducing energy consumption and do not contribute to a significant reduction in the air pollution. Provided that the current situation persists (the inertial scenario), emissions of pollutants into the air in 2024 may even grow by 0.8% compared to 2019. During the experiment on investment patterns‟ replacement in Ukraine with the patterns of Hungary and Spain, it was found that despite the change in the nature and (in the case of Hungary) the direction of investments in digital equipment and technologies, which significantly affected their amount (both in manufacturing and environmental capital), while the rest conditions for the functioning of industry remain unchanged, the indicators of value added, energy consumption, employees‟ sickness rate and air pollution level stay practically the same as before such a replacement. Therefore, the "blind" copying of the digitalization practices of other countries, while maintaining unchanged other conditions, without taking into account the peculiarities of the national institutional environment, the degree of development of science and technology, is inappropriate, since it does not lead to an improvement in the situation in Ukraine. The general conclusion is that digitalization by itself is not able to reverse the current unfavorable trends in development of Ukraine for the better. It is necessary to achieve fundamental changes in the growth of the real sector of the economy on an innovative basis, in the amount and structure of investments, in the propensity of economic entities to invest, which is now at a low level, and also to form an integral industrial-digital ecosystem, similar to European ones, but taking into account the heterogeneity of European economies and their experience, as well as the characteristics of the current state and dynamics of development of the technical, technological and institutional environment of Ukraine. [ABSTRACT FROM AUTHOR]