I apologize in advance for the fact that I don't know much functional analysis.
I have a separable Hilbert space $X$ of differentiable real functions (with possibly unbounded domain and range) and a function $f\in X$. I want to choose a basis $(x_i)_{i\ge 0}$ of $X$ such that the approximants
$$ f_n = \sum_{i=1}^n(f,x_i)_Xx_i $$
have the uniform bound condition
$$\|f'-f_n'\|_\infty \sim O(\psi(n)),$$
where $\lim_{n\to\infty}\psi(n) = 0.$ My very broad question is how to do this and what additional qualifications must be made on $X$ to guarantee that this is possible.