For your specific case, this might work:
$$
F(x) =
\begin{cases}
f(x)/x &\textrm{if $x \neq 0$} \\
0 &\textrm{if $x = 0$}
\end{cases}
$$
can be written
$$ F(x) = \frac{f(x)}{x + (x \:\texttt{==}\: 0)} \cdot (x\:\texttt{!=}\:0) $$
where $(x\:\texttt{==}\:0)$ denotes the boolean expression that returns $1$ if $x=0$ and $0$ else; and $(x\:\texttt{!=}\:0)$ is the reverse. Depending on the language, you might need to write $\operatorname{\texttt{float}}(x\:\texttt{==}\:0)$ or something like that to convert booleans to a number-like data type.
More generally, if you want a function $g$ that does this:
$$
g(x) =
\begin{cases}
x &\textrm{if $x \neq 0$} \\
a &\textrm{if $x = 0$}
\end{cases}
$$
you could do
$$ g(x) = x(x\:\texttt{!=}\:0) + a(x\:\texttt{==}\:0) $$
Although I don't think doing $g(F(x))$ for your $F$ would work, because at $x = 0$ you'd get a division by zero, which could lead to unstable arithmetic.
programming
but in that case the answer likely depends on the language used. – dxiv Apr 07 '17 at 18:56