Spacers in the compact power distribution network are essential components for the support, organization, and spacing of conductors. To improve the reliability of these components and have an optimized network design, it is necessary to evaluate the performance of the variation of their geometric parameters. The analysis of these components is fundamental, considering that there are several models available that are validated by the electric power utilities. Due to the various possible design shapes, it is necessary to use an optimized model to reduce the electric potential located in specific sites, improving the reliability in the component, as the higher electrical potential results in a greater chance of failure to occur. The finite element method (FEM) stands out for evaluating the distribution of electrical potential. In this paper, an FEM is used to evaluate variations in vertical and horizontal dimensions in spacers used in the 13.8 kV power grid. The models are analyzed in relation to their behavior regarding the potential distribution on their surface. From the results of these variations, the model is optimized by means of a mixed-integer linear problem (MILP), replacing the FEM output with a ReLU network substitute model, to obtain a spacer with more efficiency to be used in semi-insulated distribution networks.