This paper presents a generalized gradient smoothing technique, the corresponding smoothed bilinear forms, and the smoothed Galerkin weakform that is applicable to create a wide class of efficient numerical methods with special properties including the upper bound properties. A generalized gradient smoothing technique is first presented for computing the smoothed strain fields of displacement functions with discontinuous line segments, by "rudely" enforcing the Green's theorem over the smoothing domain containing these discontinuous segments. A smoothed bilinear form is then introduced for Galerkin formulation using the generalized gradient smoothing technique and smoothing domains constructed in various ways. The numerical methods developed based on this smoothed bilinear form will be spatially stable and convergent and possess three major important properties: (1) it is variationally consistent, if the solution is sought in a Hilbert space; (2) the stiffness of the discretized model will be reduced compared to the model of the finite element method (FEM) and often the exact model, which allows us to obtain upper bound solutions with respect to both the FEM solution and the exact solution; (3) the solution of the numerical method developed using the smoothed bilinear form is less insensitive to the quality of the mesh, and triangular meshes can be used perfectly without any problems. These properties have been proved, examined, and confirmed by the numerical examples. The smoothed bilinear form establishes a unified theoretical foundation for a class of smoothed Galerkin methods to analyze solid mechanics problems for solutions of special and unique properties: the node-based smoothed point interpolation method (NS-PIM), smoothed finite element method (SFEM), node-based smoothed finite element method (N-SFEM), edge-based smoothed finite element method (E-SFEM), cell-based smoothed point interpolation method (CS-PIM), etc.