Existence theorem for a Dirichlet problem with free discontinuity set