A spin filtering device based on quantum spin interference is addressed, for use with a two-dimensional GaAs/AlGaAs electron gas that has both Rashba and Dresselhaus spin-orbit(SO) couplings and an applied external magnetic field. We propose an experimentally feasible electronic Mach-Zehnder interferometer and derive a map, in parameter space, that determines perfect spin filtering conditions. We find two broad spin filtering regimes: one where filtering is achieved in the original incoming quantization basis, that takes advantage of the purely non-Abelian nature of the spin rotations; and another where one needs a tilted preferential axis in order to observe the polarized output spinor. Both solutions apply for arbitrary incoming electron polarization and energy, and are only limited in output amplitude by the randomness of the incoming spinor state. Including a full account of the beam splitter and mirror effects on spin yields solutions only for the tilted basis, but encompasses a broad range of filtering conditions.