Sorry to hear about your problems. Proper care and maintenance is the best way to make any car last. The V6 engines are notorious for needing a little bit more care because those Ford Duratecs really like eating oil.So I owned a 2004 mazda 6s V6 bought at 13k for approximately 9 years. At 38k the engine spun a bearing. I replaced the motor and at 70k on the second engine it spins another bearing. No reason a new car engine shouldn't last more than 150k. People would often be shocked at what year my car was because I took really good care of it. All in all it cost me roughly $8k over the lifetime in engine failures. I will never own and drive another mazda unless it is practically given to me.
I say watch out for mazda.
It's possible that you got two lemmings for engines, but typically Mazdas are good for well into the 100k mile range.