You can't get an arbitrary Lebesgue null set $A$ in this way. For one thing, the set of differentiability is Borel (and it's somewhere low in the Borel hierarchy, I don't remember exactly where).
If $A$ is compact, there is a simple construction: define
$$w(x) = \sum_{n=1}^\infty (1-r_n^{-1}\operatorname{dist}(x,A))^+ \tag{1}$$
where as usual, $a^+=\max(a,0)$. Here $r_n>0$ is chosen so that the measure of the $r_n$-neighborhood of $A$ is less than $2^{-n}$. This ensures that the series (1) converges in $L^1(\mathbb R)$.
Every point of the complement of $A$ has a neighborhood in which the series is a finite sum. Thus, $w$ is continuous on the complement of $A$. On the other hand, $\lim_{x\to a}w(x)=\infty$ for every $a\in A$, because when $x$ gets close to $A$, more of the terms in (1) turn to $1$.
Therefore, an antiderivative of $w$ (call it $f$) has the desired property.
The construction can be easily extended to the case of a closed unbounded set $A$.