Let $V$ a Hilbert space, $a:V\times V\rightarrow \mathbb{R}$ a bounded, symmetric and positive bilinear form and $f:V\rightarrow\mathbb{R}$ bounded.
Is well known that problem
$$\left\lbrace\begin{array}{l}\textrm{Find }u\textrm{ such that}\\ a(u,v)=f(v)\quad\forall v\in V\end{array}\right.$$
is equivalent to minimize the following (energy) functional:
$$J(v)=\dfrac{1}{2}a(v,v)-f(v).$$
If now I have some extra condition I get the problem
$$\left\lbrace\begin{array}{l}\textrm{min }J(v)\textrm{ with }v\in V\\ \textrm{ subjetc to }u=g\quad\forall v\in \tilde V\subset V\end{array}\right.$$
I'm thinking in how to get the corresponding Lagrange multipliers in Stokes-like problems, for example, where the problem is
$$\left\lbrace\begin{array}{l}\textrm{min }J(u,p)\textrm{ with }(u,q)\in V\times Q\\ \textrm{ subjetc to }\int_\Omega p=0\quad\end{array}\right.$$
but when I try to use Lagrange multipliers (learned in my first course of calculus in several variables) I need to calculate things like:
$$\nabla f=\lambda\nabla g$$
but what is "$\nabla$" operator in my context (with bilinear forms)? In other words, How can I use Lagrange multipliers in this context?