Accept your mistake.
The moment you have made the mistake, just tell your boss about it.
But if your mistake is not a very important one, then you can let it
go. Or else, simply do not hide your mistake. If someone else comes
to know of it, you will land up in a trouble.
Give opinions to your boss for resolving your mistake.
While going to your boss for admitting your mistake, you must also
have a resolution of solving your mistake. Give out your idea properly.
Inform the boss about how much time will it take, as also the costs
if any in using your idea.
Do not put your blame on anyone else.
Just blaming others will not be of any help to you. Instead you must
approach those who will be able to get you to your boss for admitting
your mistake with less fear.
You must regret for your mistake but not by hurting yourself.
There is a lot of difference in apologizing for your mistake and
beating up yourself. You are responsible for it. But that does not mean
you have to strongly criticize yourself that too infront of everyone.
Make up for your mistake by taking your own time.
Even if you are to work more for correcting your mistake, do not think that you will get paid for it. You may also have to use your lunch or other relaxing time if you want to get your mistake corrected very soon.