In many superconducting devices, including qubits, quasiparticle excitations are detrimental. A normal metal (N ) in contact with a superconductor (S) can trap these excitations; therefore, such a trap can potentially improve the device's performances. The two materials influence each other, a phenomenon known as proximity effect which has drawn attention since the 1960's. Here, we study whether this mutual influence places a limitation on the possible performance improvement in superconducting qubits. We first revisit the proximity effect in uniform NS bilayers; we show that the density of states is of the Dynes type above the minigap. We then extend our results to describe a nonuniform system in the vicinity of a trap edge. Using these results together with a phenomenological model for the suppression of the quasiparticle density due to the trap, we find in a transmon qubit an optimum trap-junction distance at which the qubit relaxation rate is minimized. This optimum distance, of the order of 4 to 20 coherence lengths, originates from the competition between proximity effect and quasiparticle density suppression. We conclude that the harmful influence of the proximity effect can be avoided so long as the trap is farther away from the junction than this optimum.