This paper presents a new smoothed particle hydrodynamics (SPH) model for the large deformation analysis of granular materials with improved accuracy and stability. In order to remove the spurious stress profile during the post-failure process which is a common issue for the application of SPH to geotechnical problems, an innovative stress diffusion term is formulated. Further a new boundary treatment is proposed with the use of renormalization techniques to give a first-order consistent wall boundary conditions for geotechnical applications. This methodology is able to deal with complex geometries such as sharp corners. A number of test cases are considered to examine the robustness and accuracy of the proposed technique. Results show that the new boundary formulation is able to improve the accuracy of the solution even for a relatively coarse particle resolution. The stress diffusion term reduces the numerical noise that affects the stress under large deformations, resulting in a smooth stress field. The proposed SPH model is finally applied to the simulation of granular flow and tunnel face collapse, showing satisfactory agreement and convergence with experimental results.