I used to toss used soil on my compost pile. It might not be good to do that, though, depending on what caused your cucumbers to die. Some plant pathogens can live in the soil for a few years, and infect any new plants that grow there. If you have a decently, hot compost pile (over 60Ã‚Âº Centigrade), or can leave it to compost for more than a couple of months, you'd probably okay, but otherwise, I would be hesitant.
You would be perfectly safe to reuse the soil for species of plants that aren't susceptible to whatever killed your cucumbers. You would need to mix it with nice, fresh healthy compost, to replace any depleted nutrients.
And the third possibility is to sterilize the soil by steaming it in your kitchen oven, but of course, that means you would be killing all the good
bacteria and other living things in the soil, along with any bad ones. You would still have to mix the soil with fresh, healthy compost before you reused it, but if you just need it for 'volume' in a plant mix, this does work. I've done it many times during periods in my life when I didn't have enough money to be buying a lot of plant mix. (Be prepared for it to stink up your kitchen, however.
"Isn't it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?" - Douglas Adams