I've been given the below equations $$\boldsymbol{\nabla}\cdot\mathbf{D}=\rho_{\rm f} \:\:\:{\rm and}\:\:\: \boldsymbol{\nabla}\times\mathbf{D}=0$$
$$\boldsymbol{\nabla}\cdot\mathbf{E}_{\rm vac}=\frac{\rho_{\rm f}}{\epsilon_{0}} \:\:\:{\rm and}\:\:\: \boldsymbol{\nabla}\times\mathbf{E}_{\rm vac}=0$$
Where both of the functions $D$ and $E_{\text {vac }}$ go to zero at infinity.
Then how can one deduce from these equations the relation $\mathbf{D}=\epsilon_{0} \mathbf{E}_{\text {vac}}$ ,given that it's not necessary for two functions to be same if their divergence and curl is the same?
It appears that you are thinking about these equations out of context. If $\rho = \rho_f + \rho_b\;\;$ (the charge distribution is the sum of the free and bound charges) then we can write the Gauss law as $$\epsilon_0\nabla \cdot \mathbf{E} = \rho = \rho_f + \rho_b \;.$$
Recall that the bound charge however relates to the polarization $\mathbf{P}$ as $$\rho_b = -\nabla \cdot \mathbf{P}$$
thus we can write
$$\epsilon_0\nabla \cdot \mathbf{E} = \rho_f -\nabla \cdot \mathbf{P}$$
$$\text{which implies that}$$
$$\epsilon_0\nabla \cdot \mathbf{E} + \nabla \cdot \mathbf{P} = \rho_f$$
$$\text{and thus}$$
$$\nabla \cdot(\epsilon_0 \mathbf{E} + \mathbf{P}) = \rho_f \;\;.$$
We then define a new field which we call the electric displacement as $$\mathbf{D} \equiv \epsilon_0 \mathbf{E} + \mathbf{P} \;.$$
It is very important to note that this is a definition and not a result. In the case where we are in a vacuum, there is no bound charge so the polarization field $\mathbf{P}$ is zero. This directly implies that $$\mathbf{D} = \epsilon_0 \mathbf{E} \;.$$
$$ $$ $\textbf{EDIT:}$
To clear up some confusion regarding a comment below, $\mathbf{D} = \epsilon_0 \mathbf{E} \;\;$ does $\mathbf{not}$ hold for linear dielectrics rather the equation
$$\mathbf{D} = \epsilon \mathbf{E}$$ holds instead where $\epsilon \equiv \epsilon_0(1 + \chi_e). $ Note that $\epsilon_0 $ is the permittivity of free space wheras $\epsilon$ is the permittivity of the medium in question. $\chi_e$ is known as the electric susceptibility of the medium and is zero in vacuum.
It can also be shown that $\mathbf{P} = \epsilon_0 \chi_e \mathbf{E}$. Observe that
$$\mathbf{D} \equiv \epsilon_0 \mathbf{E} + \mathbf{P} = \epsilon_0 \mathbf{E} +\epsilon_0 \chi_e \mathbf{E}$$
$$\text{implying}$$
$$\mathbf{D} = \epsilon_0 (1+\chi_e)\mathbf{E} = \epsilon \mathbf{E} \;.$$