We use the Schr"odinger--Newton equation to calculate the regularized self-energy of the particle using a regular self-gravitational and electrostatic potential derived in the string T-duality. The particle mass $M$ is no longer concentrated into a point but it is diluted and described by a quantum-corrected smeared energy density resulting in corrections to the energy of the particle which is interpreted as a regularized self-energy. We extend our results and find corrections to the relativistic particles using the Klein-Gordon, Proca, and Dirac equations. An important finding is that we extract a form of generalized uncertainty principle (GUP) from the corrected energy. The form of GUP is shown to depend on the nature of particles; namely, for bosons (spin $0$ and spin $1$) we obtain a quadratic form of GUP, while for fermions (spin $1/2$) we obtain a linear form of GUP. The correlation we found between spin and GUP may offer insights into investigating quantum gravity.