TITLE: Every continuous function is homotopic to a locally Lipschitz one
QUESTION [11 upvotes]: I would like to know for which category/class/set of metric spaces the following holds: for any two metric spaces $X$, $Y$, for any continuous function $f:X\to Y$ there exists a locally Lipschitz continuous function $g:X\to Y$ which is homotopic to $f$.
EDIT: One could also ask a class of metrizable topological spaces such that each one of them can be given a metric so that the above property holds. Actually, I am more interested in the underlying topological space than in the actual metric space.
In general, the metric spaces I am considering are complete and weakly separable (there exists a sequence $(\phi_h)$ of $1$-Lipschitz functions such that for any two point $x,\ y$ $d(x,y)=\sup_h|\phi_h(x)-\phi_h(y)|$).
I don't know if this is a known fact among experts or not; in that case, I apologize for the standard question and would ask only for a reference.
ADDENDUM: Although I also have an interest for the general question as it is posed above, I could try to highlight some classes of metrizable spaces I have particular interest in knowing if they fulfill the request or not: manifolds, singular spaces (which singularities are allowed), spaces which are manifolds outside a "small" (in some sense) set, compact manifolds of infinite dimension or manifolds modeled on some "nice" linear space (Banach, Hilbert, Fréchet, ...).
Thanks.

REPLY [3 votes]: Such approximation is possible under some mild assumptions about domain and range.
For the domain you want to have structure of a finite dimensional structure of a metric simplicial complex of locally bounded geometry. For example, a Riemannian manifold or Alexandrov space would do.  For the target you should impose some conditions implying local linear contractibility, for instance, a space which is locally CAT(k), where $k<\infty$ would suffice. The proof is based on barycentric maps of smplices, which you can find in the paper of Bruce Kleiner, "The local structure of length spaces of curvature bounded above", Math. Z. 1999. 
The construction of Lipschitz approximation is the same as cellular approximation in algebraic topology. First, approximate your map on the set of vertices. Then extend to simplices by induction on skeleta, using barycentric simplices as in Kleiner's paper. 
Some of this might even work if domain is infinite dimensional, but you would need to control the Lipschitz constant for the barycentric maps.