The stress-strain state in a surface-hardened bar (beam) with a stress concentrator of the semicircular notch type is investigated. A numerical method for calculating the residual stresses in the notch region after an advanced surface plastic deformation is proposed. The problem is reduced to the boundary-value problem of fictitious thermoelasticity, where the initial (plastic) deformations of the model are simulated by temperature deformations in an inhomogeneous temperature field. The solution is constructed using the finite element method.