The answer is yes if you assume $\varphi$ is surjective, and you're only looking for a function $f(\epsilon)$ which tends to zero as $\epsilon$ tends to zero.
Let's call a function $\varphi$ satisfying your given condition an $\epsilon$-isometric, linear map.
Theorem: For every $\epsilon > 0$ there is a $\delta > 0$ such that for every $\mathcal{H}$ and every linear, surjective, $\delta$-isometric map $\varphi : B(\mathcal{H})\to B(\mathcal{H})$, there is a linear isometry $\psi : B(\mathcal{H})\to B(\mathcal{H})$ such that $\|\varphi - \psi\| \le \epsilon$.
Proof: Suppose otherwise and fix $1/k$-isometric, linear, surjective maps $\varphi_k : B(\mathcal{H}_k)\to B(\mathcal{H}_k)$ which remain $\epsilon$-far away from any isometry. Then we may define a map
$$ \Phi : \prod B(\mathcal{H}_k) / \bigoplus B(\mathcal{H}_k) \to \prod B(\mathcal{H}_k) / \bigoplus B(\mathcal{H}_k) $$
in the obvious way. Note that $\Phi$ is surjective, linear and isometric. By a theorem of Kadison, then, $\Phi$ has the form $\Phi(x) = u \rho(x)$, where $u$ is a unitary and $\rho$ is a Jordan $^*$-isomorphism. (Recall that a Jordan $^*$-isomorphism is a linear, $^*$-preserving map $\rho$ satisfying $\rho(ab + ba) = \rho(a)\rho(b) + \rho(b)\rho(a)$.) We may find unitaries $U_k\in B(\mathcal{H_k})$ such that the sequence $(U_k)$ represents $u$. Then, multiplying by $u^*$ on the left, we may assume that $\Phi = \rho$. Then $\varphi_k$ is an $\epsilon_k$-approximate Jordan $^*$-isomorphism in the sense that
$$ \| \varphi_k(ab + ba) - \varphi_k(a)\varphi_k(b) - \varphi_k(b)\varphi_k(a)\| \le \epsilon_k \|a\|\|b\| $$
where $\epsilon_k\to 0$. By a result of Ilišević and Turnšek, there is an actual Jordan $^*$-isomorphism $\psi_k : B(\mathcal{H}_k)\to B(\mathcal{H}_k)$ such that $\|\psi_k - \varphi_k\|\to 0$, and since Jordan $^*$-isomorphisms are isometries, this is a contradiction.