Variational approach for a general financial equilibrium problem: The Deficit Formula, the Balance Law and the Liability Formula. A path to the economy recovery