Heuristically and naively, one might be tempted to write $f'(x)=0$ for $x\ne0$. Hence we would deduce that for some constants $A$ and $B$, $f(x)=A$ for $x<0$ and $f(x)=B$ for $x>0$.
But then we would have $f(x)=A+(B-A)H(x)$ which would suggest that for $a\ne 0$
$$(B-A)\delta(x) =a(A+(B-A)H(x))\delta(x)$$
Inasmuch as there is no meaning assignable to the distribution of the product $H(x)\delta(x)$, the only possible solution is the trivial solution $f(x)\equiv 0$
Let us attempt a solution to the original ODE by using a regularization approach. Proceeding, we let $f_n(x)$ be defined by the ODE
$$f_n'(x)=a\delta_n(x)f_n(x)$$
where $\delta_n(x)$ is any regularization of $\delta(x)$. The solution is
$$f_n(x)=f_{-\infty}\,e^{a\int_{-\infty}^x \delta_n(t)\,dt}$$
whereupon letting $n\to \infty$ reveals that
$$f(x)=f_{-\infty}e^{aH(x)}\tag 1$$
NOTE:
We remark that the function $f$, as given by $(1)$, is discontinuous and not uniquely defined at $0$. Furthermore, the candidate for its distributional derivative,
$$f'(x) =a\underbrace{f_{-\infty}e^{aH(x)}}_{\text{a discontinuous function at}\,0}\,\times \underbrace{ \delta(x)}_{\text{The Dirac Delta}}$$
is meaningless.
Another way to see this, is to observe that $(1)$ implies that $f$ can be written as the discontinuous function
$$f(x)=\begin{cases}f_{-\infty}&,x<0\\\\f_{-\infty}e^a&,x>0\end{cases}\tag2$$
And if $(2)$ is so, we can write
$$f(x)=f_{-\infty}\left(1+(e^a-1)H(x)\right)\tag3$$
But from $(3)$ the distributional derivative of $f$ is
$$f'(x)=f_{-\infty }(e^a-1)\delta(x)$$
Then, the original ODE would imply that $(e^a-1)\delta(x)=\left(1+(e^a-1)H(x)\right)\delta(x)$
which is meaningless due to the appearance of $H(x)\delta(x)$.