Discrete spectrum for non-Riemannian locally symmetric spaces. I. Construction and stability