You may have been assigned by your mother the role of her "savior" (most likely it was unconscious by her), and kind of a "substitute" for your father. This is of course unhealthy, but the child like this arrangement because it feels like he becomes "mom's partner".
If this is true, of course this behavior influences the subsequent relationships. In your case with your wife, the script you were (unconsciously) following might be something like "I will do anything for your happiness, because you always come first and me last" - the same you likely followed with your mom.
NB: Keep in mind these are just my hypotheses, and I might be 100% wrong :-)