An approach for the identification of discontinuous and nonsmooth nonlinear forces, as those generated by frictional contacts, in mechanical systems that can be approximated by a single-degree-of-freedom model is presented. To handle the sharp variations and multiple motion regimes introduced by these nonlinearities in the dynamic response, the partially-known physics-based model and noisy measurements of the system's response to a known input force are combined within a switching Gaussian process latent force model (GPLFM). In this grey-box framework, multiple Gaussian processes are used to model the unknown nonlinear force across different motion regimes and a resetting model enables the generation of discontinuities. The states of the system, nonlinear force and regime transitions are inferred by using filtering and smoothing techniques for switching linear dynamical systems. The proposed switching GPLFM is applied to a simulated dry friction oscillator and an experimental setup consisting in a single-storey frame with a brass-to-steel contact. Excellent results are obtained in terms of the identified nonlinear and discontinuous friction force for varying: (i) normal load amplitudes in the contact; (ii) measurement noise levels and (iii) number of samples in the datasets. Moreover, the identified states, friction force and sequence of motion regimes are used for evaluating: (1) uncertain system parameters; (2) the friction force-velocity relationship and (3) the static friction force. The correct identification of the discontinuous nonlinear force and the quantification of any remaining uncertainty in its prediction enable the implementation an accurate forward model able to predict the system's response to different input forces.