The optimal way to cycle is to maintain a more or less constant cadence; that is, the rate at which you pedal. This is not easy on a single speed cycle, but on a geared cycle you have all the help you need to keep pushing at an optimal constant rate. So, when you are riding uphill and it becomes increasingly tough to pedal, you just shift the gears down but maintain the cadence. You obviously lose speed, but the combination of a lower gear and optimal pedaling speed results in the best usage of your resources. You could stay in a higher gear and put more effort in pedalling, but that would tire you down. Gearing down and pedaling at the same rate is your best bet even if it means that you move slower.
This trick, like everything else about cycling, has an analogy in life. When you face a rough patch, or obstacles, or an unexpected lack of results, maintain your optimal cadence, your rhythm. While riding uphill in life, you automatically shift down to a lower emotional and mental “gear”. The win is in not letting the situation affect your cadence. Put in the same number of hours. Maintain your schedule. You will probably be less productive, but you will be better off than resisting the change or giving up altogether. In life, like in cycling, you can only control how much you pedal. The result varies.