This study focuses on achieving a self-healing network with high reliability and minimal losses by discussing the optimal placement of distributed generation (DG) sources in the network using the particle swarm algorithm (PSO). Optimal placement not only reduces losses but also enhances the voltage profile and enhances system reliability. Consequently, the paper explores the concept of a self-healing smart grid. Smart grids possess a crucial attribute known as self-healing, designed to enhance the system's dependability. The self-healing power grid can detect and rectify disruptions within its infrastructure with minimal or even absent human intervention. This study examines a standard IEEE 69-bus network and presents results demonstrating the network's safety, the prevention of blackouts, the reduction of losses, and the substantial enhancement of the voltage profile.