A loss-of-power incident is generally a survivable event as long as you keep your wits about you. One thing that could mean the difference between life and death is whether you leave the retractable gear up or down as you reach the point of your forced landing.
While you and your airplane would be best off with the gear down if you are landing on a hard surface, there may be times when the gear should stay in the wells. Like many things flying related, you need to make plans before a real emergency happens. Read your POH to see if there are any recommendations for your particular airplane. Query your instructor during your biennial or recurrent training sessions.
In most cases you may be best off keeping the gear up if the forced landing will end up in the water. Lowering the gear increases the risk of the airplane tumbling over the nose and you may get trapped inside. The same is true for very soft surfaces, such as snow or mud.
You should consider as many scenarios as you can dream up and think through the best course of action long before you get yourself in this precarious situation. Then, when you are busy assessing the quandary as you get closer and closer to terra firma, you won’t need as much time to evaluate whether you’re better off with the gear up or down.