Quantum spin systems and supersymmetric gauge theories. Part I