We may have different "flavours" in the set-up of First-Order Predicate Calculus in Hilbert-style :
1) to use modus ponens as only inference rule (of course with suitable axioms);
in this way we have a "propositional" Deduction Theorem, without restrictions regarding free variables in the assumption to be discharged: see Herbert Enderton, A Mathematical Introduction to Logic (2nd ed Harcourt - 2001).
Alternatively :
2) to use also generalization rule;
in this way we need the usual restrictions on the Deduction Theorem for the Predicate Calculus, in order to avoid fallacies [to avoid that $\vdash P(x) \rightarrow \forall x P(x)$] : see Elliott Mendelson, Introduction to Mathematical Logic (4th ed - 1997).
We may have also two approaches to the definition of the basic semantical relation :
$\vDash_{\mathfrak{A}} \varphi$, i.e. "$\varphi$ is true in $\mathfrak{A}$".
a) Enderton (page 83) states it as :
let $\varphi$ be a formula of our language,
$\mathfrak{A}$ a structure for the language,
let $s : V \rightarrow |\mathfrak{A}|$ a function from the set $V$ of all variables [of the language] into the universe $|\mathfrak{A}|$ of $\mathfrak{A}$.
Then we will define what it means for $\mathfrak{A}$ to satisfy $\varphi$ with $s$:
$\vDash_{\mathfrak{A}} \varphi[s]$.
As you can see, $\varphi$ is a formula; there is no restriction on having free variables in it. Then we will have the "special case" of sentences, i.e. closed formulas [page 87] :
for a sentence $\sigma$, either (a) $\mathfrak{A}$ satisfies $\sigma$ with every function $s$ from $V$ into $|\mathfrak{A}|$, or (b) $\mathfrak{A}$ does not satisfy $\sigma$ with any such function. If alternative (a) holds, then we say that $\sigma$ is true in $\mathfrak{A}$ (written $\vDash_{\mathfrak{A}} \sigma$) or that $\mathfrak{A}$ is a model of $\sigma$.
b) Dirk van Dalen in Logic and Structure (5th ed - 2013), page 64, "gives meaning" directly to sentences.
The fundamental clause is :
$| \forall x \varphi|_{\mathfrak{A}} := min \{ |\varphi [a/x]_\mathfrak{A} | : a \in |\mathfrak{A}| \}$.
Then, page 66 :
So far we have only defined truth for sentences of [the language] $L$. In order to extend $\vDash$ to arbitrary formulas we introduce a new notation.
Let $FV(\varphi) = \{z_1, . . . , z_k \}$, then $Cl(\varphi) := \forall z_1 . . . \forall z_k \varphi$ is the universal closure of $\varphi$.
We say that :
$\vDash_{\mathfrak{A}} \varphi$ iff $\vDash_{\mathfrak{A}} Cl(\varphi)$.
In this way, the semantics for open formulas is a "derived one".
Next option is about logical consequence: we may define it only for sentences (van Dalen, page 67 : semantic consequence), or for formulas in general (Eenderton, page 88, and Mendelson, page 65 : logically implies).
But the previous "ingredients" mix together.
Basically, when we define a proof system, we want that it is sound and complete. In the "most general" form, we expect that :
$\Gamma \vdash \varphi$ iff $\Gamma \vDash \varphi$.
About soundenss: no problem, this is the easy task, while regarding completeness, we may have some "imperfection".
For example, in Mendelson's proof system we have generalization and the (standard) definition of derivation allows us to have :
$P(x) \vdash \forall x P(x)$.
Of course, M's proof system is sound; due to the restrictions on the Deduction Theorem, we cannot derive the (invalid) : $\vdash P(x) \rightarrow \forall x P(x)$.
But, according to M's semantics, we have : $P(x) \nvDash \forall x P(x)$.
Why ? Because the semantics give us : $B$ logically implies $A$ iff $B \rightarrow A$ is valid, and we know that $P(x) \rightarrow \forall x P(x)$ is not valid !
In conclusion, Mendelson is not licensed to state that, in general :
if $\Gamma \vdash \varphi$, then $\Gamma \vDash \varphi$
and he does not state it ...
Comment
Regarding :
If $\varphi$ fails in $\mathbf M$ [i.e. not $\mathbf M \vDash \varphi$], then we write $\mathbf M \nvDash \varphi$, which is equivalent to $\mathbf M \vDash \lnot \varphi$ (this is because for any $\mathcal L$-formula $\varphi$ we have either $\mathbf M \vDash \varphi$ or $\mathbf M \vDash \lnot \varphi$)
it is definitely sentence in place of formula.
Consider again the "basic" semantic clause :
Then an $\mathcal L$-structure $\mathfrak A$ is a model of $\varphi$ if for every assignment $s$ in $\mathfrak A$ we have $(\mathfrak A,s) \models \varphi$, i.e. $\varphi$ holds in the $\mathcal L$-interpretation $(\mathfrak A,s)$.
Consider now the structure $\mathfrak A = (\mathbb N, 0, <)$ and the formula $\varphi$ :
$0 < x$.
Clearly, with the assignement $s : Var \mapsto \mathbb N$ such that $s(x)=0$ we have that :
$(\mathfrak A,s) \nvDash \varphi$;
thus, it is not true that for every assignment s in $\mathfrak A$, $\varphi$ holds in the $\mathcal L$-interpretation $(\mathfrak A,s)$. Thus, it is not true that $\mathfrak A$ is a model of $\varphi$ (i.e. that $\mathfrak A \vDash \varphi$).
Consider now its negation : $\lnot \varphi$, which is :
$\lnot (0 < x)$, i.e. $0 \ge x$.
With the assignement $s^* : Var \mapsto \mathbb N$ such that $s^*(x)=1$ we have :
$(\mathfrak A,s^*) \nvDash \lnot \varphi$.
Again, it is not true that $\mathfrak A \vDash \lnot \varphi$.