In the Wilson's lattice formulation of QCD, a fermionic Fock space of states can be explicitly built at each time slice using canonical creation and annihilation operators. The partition function Z is then represented as the trace of the transfer matrix, and its usual functional representation as a path integral of exp(−S) can be recovered in a standard way. However, applying a Bogoliubov transformation on the canonical operators before passing to the functional formalism, we can isolate a vacuum contribution in the resulting action which depends only on the parameters of the transformation and fixes them via a variational principle. Then, inserting in the trace defining Z an operator projecting on the mesons subspace at each time slice and making the physical assumption that the true partition function is well approximate by the projected one, we can also write an effective quadratic action for mesons. We tested the method in the renowned 't Hooft model, namely QCD in two spacetime dimensions for large number of colours, in Coulomb gauge.