There is a very general statement that can be made (in my notation, over-dots denote derivatives of subsets):
Proposition. Let $(X, \mathscr{T})$ be a $T_1$-space. Then for any $M \subseteq X$ one has the relation $\ddot{M} \subseteq \dot{M}$.
Proof: Consider $x \in \ddot{M}$ and let $U \in \mathscr{T}$ be an arbitrary open neighbourhood of $x$ (so that $x \in U$); by definition, we must have that the following intersection is nonempty
$$(U \setminus \{x\}) \cap \dot{M} \neq \varnothing$$
so then there exists $y \in (U \setminus \{x\}) \cap \dot{M}$; we have thus that $y$ is an accumulation point for $M$. As our space is $T_1$, the singleton $\{x\}$ is closed and therefore the set-theoretic difference $V=U \setminus \{x\}$ is open (as the difference between an open subset and a closed one); hence, $V$ is an open neighbourhood of $y$ and again by definition of accumulation points we must have that
$$(V \setminus \{y\}) \cap M \neq \varnothing$$
which entails
$$(U \setminus \{x\}) \cap M \neq \varnothing$$
From the arbitrariness of $U$ we conclude that $x$ is an accumulation point for $M$ as well, and thus that $\ddot{M} \subseteq \dot{M}$. $\Box$
From this one immediately obtains the following:
Corollary: in a $T_1$ space any derivative is a closed subset.
Proof: keeping the notations from the previous paragraph, let us recall that $\overline{T}=T \cup \dot{T}$ for any subset $T \subseteq X$. In particular, we will have $\overline{\dot{M}}=\dot{M} \cup \ddot{M}=\dot{M}$, by virtue of the proposition above, which tells us that the derivative of $M$ is indeed closed. $\Box$
Metric spaces are Hausdorff spaces, which is a stronger separation property than $T_1$ so the above applies to them in particular.
As an additional remark, it can be shown that
Proposition: Let $(X, \mathscr{T})$ be an arbitrary topological space and $F \subseteq X$ a closed subset. Then the derivative $\dot{F}$ is also closed (in other words, derivatives of closed subsets remain closed, without any hypothesis on the ambient space).