I don't see this as being possible. If I'm reading this right, what needs to happen is that both parts of the function need to have the same slope at x=0. So:
And obviously that can't be. So, I don't think it is possible for f(x) to be differentiable for all x.