A non-local approximation of free discontinuity problems in SBV and SBD