Non-isothermal cyclic fatigue in an oscillating elastoplastic beam