Singular perturbations with boundary conditions and the Casimir effect in the half space