When does the residue field of a local ring embed back into the local ring (nicely)?

Let $A$ be a local ring with maximal ideal $\mathfrak{m}$ and residue field $k:=A/\mathfrak{m}$, which fit into a s.e.s. $$0\ \longrightarrow\ \mathfrak{m}\ \longrightarrow\ A\ \longrightarrow\ k\ \longrightarrow\ 0,$$ of $A$-modules. I'm curious to know under what conditions it splits. It splits if $k$ is finite, and trying a few examples suggests it also splits if $\operatorname{char}(k)=0$, or at least when $k$ is algebraic over $\Bbb{Q}$. But I'm struggling to get a grip on the problem for residue fields that are not algebraic over their prime field. Some help or a reference is very welcome.

The flaw in your question comes from a misunderstanding, what the title is supposed to mean formally.

As said in the comments, the $A$-module map $A \to A/\mathfrak m$ never splits as a map of $A$-modules, if $\mathfrak m \neq 0$.

The correct formal translation of your title "When does the residue field of a local ring embed back into the local ring (nicely)?" is asking whether the map $A \to A/\mathfrak m =: k$ splits as a ring map, i.e. whether $A$ has the structure of a $k$-algebra, such that $k \to A \to k$ is the identity map.

One situation with affirmative answer is $A=R_{\mathfrak m}$ with $R$ a finitely generated $k=\bar k$-algebra and $\mathfrak m$ a maximal ideal.

• The comments you mention seem to have been removed, nonetheless I understand now why this is so. Indeed the question as I wrote is not much of a question, as you point out, so I'd like to rephrase it to ask what you suggest. That would render your answer mostly obsolete though, so if you prefer I ask a new question, just say so. – Servaes Dec 2 '16 at 18:40
• One of the important situation where positive results can be proved is in the case of complete local rings. I suggest you google Cohen structure theorem. – Mohan Dec 30 '16 at 16:32