Flexoelectricity (FE) refers to the two-way coupling between strain gradients and the electric field in dielectric materials, and is universal compared to piezoelectricity, which is restricted to dielectrics with noncentralsymmetric crystalline structure. Involving strain gradients makes the phenomenon of flexoelectricity size dependent and more important for nanoscale applications. However, strain gradients involve higher order spatial derivate of displacements and bring difficulties to the solution of flexoelectric problems. This dilemma impedes the application of such universal phenomenon in multiple fields, such as sensors, actuators, and nanogenerators. In this study, we develop a mixed finite element method (FEM) for the study of problems with both strain gradient elasticity (SGE) and flexoelectricity being taken into account. To use C^{0} continuous elements in mixed FEM, the kinematic relationship between displacement field and its gradient is enforced by Lagrangian multipliers. Besides, four types of 2D mixed finite elements are developed to study the flexoelectric effect. Verification as well as validation of the present mixed FEM is performed through comparing numerical results with analytical solutions for an infinite tube problem. Finally, mixed FEM is used to simulate the electromechanical behavior of a 2D block subjected to concentrated force or voltage. This study proves that the present mixed FEM is an effective tool to explore the electromechanical behaviors of materials with the consideration of flexoelectricity.