Can a point and a compact set in a Tychonoff space be separated by a continuous function into an arbitrary finite dimension Lie group? Given a topological space $X$ which is Tychonoff (i.e., completely regular and Hausdorff), we know that given a compact set $K\subseteq X$ and a point $p \in X$ with $p\not\in K$, we can construct a continuous function $f:X\to \mathbb{R}$ such that $f(K)=0$ and $f(\{p\})=1$.
If, instead of $\mathbb{R}$, I take an arbitrary finite dimensional Lie group $M$, can I still construct a continuous function $f':X\to M$ that will separate $K$ and $p$ for two different arbitrary points in $M$? 
Is it enough to assume $X$ to be Tychonoff or do I need further or different assumptions about $X$? For example, is $X$ being metric sufficient?

As far as I remember, each Lie group $M$ is locally Euclidean, so there is a homeomorphic embedding $i:\Bbb R\to M$, which yields the required separating map $f'=i\circ f$.
