Was this teaching (of soul existing before a birth) condemned by the Church? What's the official name (if any) of the teaching that the soul of a man exists even before he is conceived and that at the moment of conception his soul gets simply "connected" to his newly conceived body as opposed to the idea of the soul of a man being created at that very moment?

Is it true that this teaching was deemed by the Church (Catholic or Orthodox or by the Church before 1054) as a heresy and, thus, was condemned?

EDIT:
In case it is important, I am talking about the teaching that the soul of each human was at one point created by God - perhaps, all of the humans' souls were created at once - prior to his or her physical birth on this earth.
Sounds like you are referring to the idea of the pre-existence of souls.  This idea is lumped with &quot;Origenism&quot;. Check this thread out here:  What is &quot; Origenism&quot;
This is an excerpt from orthodoxwiki.org/Apocatastasis:

The anathemas of the local Council of Constantinople in 453, which is understood by most commentators to be confirmed by the Fifth Ecumenical Council in 553, posthumously excommunicated Origen and anyone following specific points of his teachings. These anathemas condemned his protology of pre-existent souls and his eschatology of universal restoration of all things &quot;which follows from&quot; his protology:

If anyone asserts the fabulous pre-existence of souls, and shall assert the monstrous restoration which follows from it:  let him be anathema. (First anathema against Origen)