You can refer to your personal humour collection to boost your spirits. It is said that laughter is contagious so try to be around happy people and you will get a happy face for yourself. Nothing like a powerful smile to boost sinking spirits. You are also advised to make it a habit to try and bring some humour in your life. You just need to look around you or even take a light-hearted view of your difficulties.
Unplanned humor is great, but laughter has too many benefits to let it happen by chance.