Q:

For what $f$ is $\int_{-\infty}^\infty f(x)\,dx = 2 \int_0^\infty f(x) \,dx \neq \pm \infty$?

I just keep the cases $\pm \infty$ out, so that there are no trivial solutions such as $f(x)=x$.
Can you give just not some examples but more of a general formula (if there is) for some solutions?

A:

Continuous even functions which tend to zero quickly are a class worth looking at. For example, $f(x)=\dfrac{1}{x^2+1}$.
An example of an even, continuous, function which does tend to zero for which this will not work is $g(x) = \dfrac{1}{|x|+1}$.
There are many other functions (both continuous and not) that satisfy this, though, having no absolute defining pattern. And so a formula will not be possible. For example, 
$$h(x) = \begin{cases} 0 & x < -3 \\ 1 & -3\le x \le -2 \\ 0 & -2< x < 201.3 \\ 1 & 201.3 \le x \le 202.3 \\ 0 & x> 202.3\end{cases}$$
satisfies your criteria.

