A branch and bound approach for a class of non-convex problems with applications to robust regression