Probability density functions of work and heat near the stochastic resonance of a colloidal particle