Let $f$ and $g$ be two real smooth functions defined over $\mathbb{R}$. Suppose that at a point $x_0$ we have that $f(x_0)=g(x_0)=y_0$ and also $f'(x_0)=g'(x_0)=m$, i.e. they meet "smoothly".
My question is: is there a way to make up a third function $h$ such that $h(x_0)=y_0$, $f'(x_0)=m$, $h$ resembles (in some suitable sense) $f$ for $x\in(-\infty,x_0]$ and resembles (in the same suitable sense) $g$ for $x\in[x_0,\infty)$?
As an example, consider $f(x)=1-e^x$ and $g(x)=\ln(1-x)$, with $x_0=0$.
EDIT: In this case I'd like to end up with a function that looks like $f$ on the left of the origin and that looks like $g$ on the right: this function "forgets" about $g$ going towards $-\infty$, keeping only information about $f$, and the other way around going towards $+\infty$.
EDIT 2: I am not looking for a piecewise defined function, rather a "one piece" function
You can cheat if you allow absolute value $|x|$. Using it we define the function $$h_a(x) := \frac{1}{2} \left(\frac{|x-a|}{x-a} + 1 \right)$$
This function equals $0$ for $x < a$ and $1$ for $x > a$. It is however not defined at $x = a$.
Then you could say that given your two functions $f,g$ and the point where you want to merge them $a$, the "equivalent function" could be $$ h_a(x) f(x) + (1-h_a(x)) g(x) $$ This however won't solve the discontinuity at $x=a$ even though it is a removable discontinuity.