If your erections are normal while masturbating, then the problem may well be pyschological in nature. Is this the reason that there's stress in your relationship, or is the stress in your relationship the reason for this? The latter appears to be the case. Visiting a counsellor for couples therapy will be a great first step. Often, frankness, open communication, understanding, love, and tincture of time is useful for such problems.