Let $(X,d)$ be a finite metric space, and let $\varepsilon>0$ be given. In this question I would like to understand
how to show in detail the existence of a metric $\tilde{d}$ on $X$ that is "$\varepsilon$-close to $d$": \begin{align} |\tilde{d}(x,y)-d(x,y)|\leq\varepsilon,\qquad\forall x,y\in X \end{align} and "has rational distance": \begin{align} \tilde{d}(x,y)\in\mathbb{Q},\qquad\forall x,y\in X \end{align}
My motivation comes from the encounter with the Gromov-Hausdorff metric space $(\mathcal{M},d_{GH})$. In the proof of separability of $(\mathcal{M},d_{GH})$, the countable dense subset is given by the collection of all such finite metric spaces with rational distance (up to isometry). The idea is that any compact metric space can be "approximated" by a finite metric space, but the collection of all finite metric spaces (up to isometry) may still be uncountable (due to the many choices of metric on the same underlying set), so we restrict ourselves to those that have rational distance. Then we need to make sure that any metric on a finite space can be "approximated" by one that has rational distance. It is here where I am unable to spell out the detail.
My attempt was a constructive proof: Denote $X=\{x_i\}_{i=1}^N$, and denote $d(x_i,x_j)=|x_ix_j|$. Clearly, the interval $\big(|x_ix_j|-\varepsilon,|x_ix_j|+\varepsilon\big)$ always contains some rational number $q_{ij}$. The problem is how to choose them in order to make the triangle inequality \begin{align} q_{ij}\leq q_{ik}+q_{jk} \end{align} holds, so that we can define $\tilde{d}(x_i,x_j)=\tilde{d}(x_j,x_i)=q_{ij}$. For $i<j$ we always have $|x_ix_j|>0$, so I was thinking of diminishing it a little to get $q_{ij}$ while enlarging $|x_ix_k|$, $|x_jx_k|$ a little to get $q_{ik},q_{jk}$, but this seems not to work because the same $q_{ij}$ needs to appear in both sides of the triangle inequality (e.g. $q_{12}$ is on the L.H.S. of $q_{12}\leq q_{13}+q_{23}$ while on the R.H.S. of $q_{23}\leq q_{12}+q_{13}$).
Any comment, hint or answer is welcome and greatly appreciated.
Here are the steps of the proof, all quite elementary.
Suppose $X$ has cardinality $n$. Then each pseudometric on $X$ is encoded by a vector in ${\mathbb R}^N$, $N=n(n-1)/2$. The semipositivity conditions and triangle inequalities satisfied by the pseudometrics amount to a system of nonstrict linear (homogeneous) inequalities $f_k({\mathbf v})\ge 0$, $k=1,...,K$. Thus, the space of possible pseudometrics on $X$ is a closed convex cone $C$ in ${\mathbb R}^N$. Let $C^\circ\subset C$ denote the subset given by the strict inequalities $f_k({\mathbf v})> 0$, $k=1,...,K$. Then each vector in $C^\circ$ corresponds to a genuine metric on $X$ and $C^\circ$ is open in ${\mathbb R}^N$.
Show that the cone $C$ has nonempty interior. For instance, the discrete metric belongs to $C^\circ$, which is contained in the interior of $C$ (in fact, it equals to the interior of $C$ but we will not need this).
Use the fact that each closed convex subset of ${\mathbb R}^N$ (with nonempty interior) is the closure of its interior. (This is true in much greater generality of convex subsets in topological vector spaces, see here.)
Lastly, use density of rational points in the interior of $C$.