We determine how to optimally reset a superconducting qubit which interacts with a thermal environment in such a way that the coupling strength is tunable. Describing the system in terms of a time-local master equation with time-dependent decay rates and using quantum optimal control theory, we identify temporal shapes of tunable level splittings which maximize the efficiency of the reset protocol in terms of duration and error. Time-dependent level splittings imply a modification of the system-environment coupling, varying the decay rates as well as the Lindblad operators. Our approach thus demonstrates efficient reservoir engineering employing quantum optimal control. We find the optimized reset strategy to consist in maximizing the decay rate from one state and driving non-adiabatic population transfer into this strongly decaying state.