Wait... they did what? No... they wouldn't do that. Really? No...but...sigh.
When this comes from someone you care about, it's tough to handle. Dealing with this issue is a gradual process that stretches far, from denial down the long road to acceptance.
Simply denying it ever happened is easy enough. Forget it ever happened. This is surprisingly easy to do. One off odd situations are probably better off left here.
For something bigger, you have to eventually get on the path to acceptance. It starts with admitting it. It really did happen. Some illusion you had has been shattered. What it really comes down to is: you have to accept that they are not perfect either. They may think what they did was wrong, they may still think it was the right thing to do. It doesn't really matter. They still did it.
You thought you knew them better, and assumed they would act differently. Maybe it's helpful to realize that you are indeed getting to know them a little bit better. Know their flaws. None of us are perfect.
If they had been on a pedestal in your life, now is the time you start to realize that they are human too. They are still learning. Still making mistakes. Sometimes big ones. That's ok.
Learn what you can from what happened. Then get out. Don't stay here, it's a dangerous place. Leave it behind. Forgive if necessary, and move on. Try to think about how you can show your love for them productively. Press forward with the hope of a better future.