No matter how big mistake you have made it is always better to confess the truth to your loved ones. If the person is matured enough, he/she will appreciate the effort you took to speak the truth because not everyone have the guts to confess the truth. And even if the person doesn’t forgive you, at least you feel good from within after speaking the truth.
Finally if the person really cares for you then sooner or later he/she will understand. All you need is to give them time. Time has the power to heal everything.