As noted by RobertZ, your proof is correct. Here is another proof that follows the same outline as yours: first we find another zero for the antiderivative of $f$ and then we use Rolle's theorem in an appropriate way. This approach is admittedly more long-winded but doesn't make use of the $e^{-x}$ trick.
Define $F: [0,1] \to \mathbb{R}$ as $F(x) =\displaystyle \int_{0}^{x}f(t)dt.$ Note that the given condition can be stated as $\displaystyle \int_{0}^{1}F(t)dt =0$
Claim 1: There exists $b \in (0,1)$ such that $F(b) =0.$
Proof of claim 1: By the mean value theorem for integrals there exists $b \in (0,1)$ such that $F(b)= \displaystyle \int_{0}^{1}F(t)dt$, which implies $F(b)=0.$
Now, we look for an appropriate sub-interval of $[0,b]$ on which we can apply Rolle's theorem to $g.$
Let $G(x)=\displaystyle \int_{0}^{x}F(t)dt$ and define $g:[0,b] \to \mathbb{R}$ by $g(x)= G(x) -F(x).$
Claim 2: $g$ is not injective on $[0, b].$
Proof of claim 2: Suppose not. Then $g$ is injective and since it is clearly continuous too, $g$ is monotone. WLOG, let $g$ be monotone increasing. Then since $g$ is differentiable, $g'(x) \geq 0 \, \forall \, x \in [0,1].$ If there exists at least one $x$ for which $g'(x) =0$ we are done so assume $g'(x)>0.$ Since $g(0) =0,$ we have $g(x)>0$ for all $x \in (0,b].$
Let $x_{0}$ be a point of maximisation for $F.$ Assume $F$ is not identically $0$ or else $f$ is and the problem is trivial. We claim that there exists $c \in (0, b)$ such that $F(c)<0.$ If $x_{0}=0$ or $b$ then $F\leq 0$ so if $F$ is not identically $0$ choose an other point of $(0, b)$ to be $c.$ If $x_{0} \in (0, b)$ then since $g({x}_{0})>0, F(x_{0})< \displaystyle \int_{0}^{x_{0}}F(t)dt \leq x_{0}F(x_{0}).$
If $F(x_{0}) \neq 0$ we get $x_{0} \geq 1,$ a contradiction. Hence $F(x_{0})=0$ and since $F$ is not identically $0$ there exists some $c \in (0, b)$ such that $F(c)<0.$
Since $F$ is a continuous function on a closed and bounded interval $[0, b]$, it attains its bounds. In particular $\exists \, d \in [0, b]$ such that $F(d)\leq F(x) \, \forall \, x \in [0,b].$ Clearly $d\neq 0, 1$ or else $F(x) \geq 0 \, \forall x \in [0,b]$ contradicting the fact that $F(c) <0.$ Therefore $d \in (0,b)$ and since it is a point of minimisation, $F'(d) =0.$ Then $F(d)= F(d) -F'(d) =g'(d)>0> F(c)$ contradicting the fact that $d$ is a point of minimisation of $F.$ Therefore our hypothesis that $g$ is injective is false and hence $g$ is not injective and there exists $a, a' \in [0, b]$ with $a \neq a'$ such that $g(a) =g(a').$
Then since $g$ restricted to $[a, a']$ satisfies the conditions for Rolle's Theorem, there exists some $x_0 \in (a,a')$ such that $g'(x_0)=0$ which implies $F(x_0)=F'(x_0)$ from which it follows that $f(x_{0}) = \displaystyle \int_{0}^{x_{0}}f(x)dx$
Note that the proof follows almost identically if we assume $g$ to be monotone decreasing in the proof of the claim.