Distilling quantum entanglement via mode-matched filtering