Can a man donate his sperm to a infertile couple that are married for a procedure that does not involve any marital relations,or is the child a mamzer anyway ?
A child from an IVF procedure is not a mamzer [illegitimate child born of certain relations forbidden by Torah law] as there was no act of forbidden relations.
There is however a concern of confusion of the lineage of the child and so receiving a sperm donation from a Jew is a very delicate and serious halachic dilemma. There is also the issue of a Jew extracting seed for donation to someone other than his wife. Some authorities allow receiving sperm from a non Jewish donor but not from a Jewish donor.
When this question is relevant to someone on the practical level it is crucial to be in touch with a Rav who is an expert in these matters who can understand the situation with all it’s details and guide the couple to the right decision.
See Igros Moshe (Even Ha’Ezer 1:71). He permits receiving a sperm donation from a non-Jew; however, a number of authorities, including Minchas Yitzchak (4:5), Tzitz Eliezer (9:51), and Yabia Omer (8:21), prohibit it.