The answer is yes. It suffices to assume that the set $E$ of non-differentiability has Lebesgue measure zero. Indeed, such $E$ is contained in an open set $U$ of measure less than $\epsilon$. (When $E$ is countable, $U$ can be constructed as countable union of intervals of length $\epsilon/2^n$.) Being open, $U$ is the union of disjoint intervals $(a_n,b_n)$. On each such interval, construct a smooth function $g_n$ such that
- $g_n(a_n)=f(a_n)$, $g_n(b_n)=f(b_n)$, $g_n'(a_n)=f'(a_n)$, $g_n'(b_n)=f'(b_n)$.
- $|g_n(x)-f(x)|\le C\min(x-a,b-x)^2$ where $C$ is independent of $n$
Define $g= g_n$ on $(a_n,b_n)$ and $g=f$ on $U^c$. Using properties (1)-(2), check that the new function is differentiable at every point of $\partial U$. Property (2) will help to handle the points $y\in \partial U$ such that every neighborhood of $y$ contains infinitely many intervals $(a_n,b_n)$.