f you honestly ask yourself that question in regards to infidelity, most of the time it has little to do with honesty or your relationship. It's because you feel guilty, or you feel the need for absolution or forgiveness. You feel like a horrible person. Confessing is less about consideration for the other party, and more about selfishness in the need to assuage your conscience and make you feel better
Doesn't the fact that you would feel better in confessing tell you it is the right thing to do ?
Why confess to God if He is already aware ?... it's like when you have a child confess for an offence that was in full view for all to see
verbal acknowledgement helps you see the gravity of what you have done. and hopely in the case of adultery true remorse.
Our sins are forgiven at salvation (positional forgiveness), but our daily fellowship with God needs to stay in good standing (relational forgiveness).
Hosea 5:15, “I will go and return to my place, till they acknowledge their offence, and seek my face: in their affliction they will seek me early.”
To in return hear the voice of forgiveness indeed may release your affliction
To share a bed is to share no secerts.... if indeed you desire deep lasting trust and peace !