We propose and experimentally explore a method for realizing frustrated lattice models using a Bose-Einstein condensate held in an optical square lattice. A small lattice distortion opens up an energy gap such that the lowest band splits into two. Along the edge of the first Brillouin zone for both bands, a nearly flat energy-momentum dispersion is realized. For the excited band, a highly degenerate energy minimum arises. By loading ultracold atoms into the excited band, a classically frustrated XY-model is formed, describing rotors on a square lattice with competing nearest and next-nearest tunneling couplings. Our experimental optical lattice provides a regime where a fully coherent Bose-Einstein condensate is observed and a regime where frustration is expected. If we adiabatically tune from the condensate regime to the regime of frustration, the momentum spectra show a complete loss of coherence. Upon slowly tuning back to the condensate regime, coherence is largely restored. Good agreement with model calculations is obtained.