This question is related to one in this question where the author asks what is the intuition behind saying that derivative is the best linear approximation. One of the answers by user "Milo Brandt" is that we have two theorems, one of which is: $f$ is differentiable at $x_0$ if and only if there is a linear function $g$ which is at least as good of an approximation as any other linear $h$.
I am struggling to prove one part of this theorem. First, I think that $g$ and $h$ are supposed to be affine and not linear in a sense that $g(x) = A + B(x-x_0)$ and $h(x) = C + D(x-x_0)$ where $A,C \in \mathbb{R}^m$ and $B,D : \mathbb{R}^n \to \mathbb{R}^m$ are linear functions.
Assume that there is such function $g$ which is at least as good as an approximation as any other $h$. By definition, this means that there exists $\delta > 0$ such that for all $x$ that have $|x - x_0 | < \delta$ we have $|f(x) - g(x)| \leq |h(x) - f(x)|$.
I would like to show that $f$ is differentiable at $x_0$, in other words, that there exists a linear function $\lambda : \mathbb{R}^n \to \mathbb{R}^m$ such that:
$$ \lim \limits_{x \to x_0} \frac{|f(x) - f(x_0) - \lambda(x-x_0)|}{|x-x_0|} = 0 $$
This translates to be able to find such $\lambda$ so that for each $\varepsilon > 0$ we can find $\delta > 0$ such that when $|x - x_0| < \delta$, we have $|f(x) - f(x_0) - \lambda(x-x_0)| < \varepsilon |x-x_0|$.
I think intuitively, I would like to show that $\lambda = B$ is correct choice. From $g$ being as good as approximation as any $h$, I have the following: there is $\delta > 0 $ so that for all $|x - x_0| < \delta$ I have $|f(x) - g(x)| \leq |C - f(x) + D(x-x_0)|$. Now, I can use triangle inequality and also result that I have already proven which is that any linear function $D$ is bounded in the following way: $|D(x-x_0)| < M|x-x_0|$.
In this case, I can show that I can always find $\delta > 0$ such that for all $|x-x_0| <\delta$ I have $|f(x) - g(x) | \leq |C-f(x)+D(x-x_0)| \leq |C - f(x)| + |D(x-x_0)| < |C - f(x)| + M|x-x_0|$. As $h$ is arbitrary, I could choose $M = \varepsilon$ as I also know that $M = \sqrt{mn}$ $ \mathrm{max}_{ij}|D_{ij}|$. But then I would only get that $|f(x) - g(x)| < |C - f(x)| + \varepsilon |x-x_0|$.
How to get rid of the second term? Should I use continuity? Do I somehow use that $g$ is linear now? Any help would be appreciated - thanks!