Owning up to your mistake is the only way you will be able to learn from the experience. Moreover, admitting to errors gives your colleagues a sense that you are an up-front person. So, acknowledge your mistake - everyone makes them at some point - and take responsibility for it. In addition to making you defensive, denying responsibility only tends to elongate the resolution process.
Take some time to try to understand what led to the mistake. Go back through the series of events prior to the error, consider at what point things went wrong and ask yourself what could have been done differently. Outline these details and document it for future internal reference.
Depending on the mistake, you should consider addressing key stakeholders to prevent them from feeling blindsided. The earlier you expose the issue to these stakeholders, the better the outcome will be. Moreover, consider scheduling a meeting with your team to talk through the situation.
It is not enough to simply admit to your mistake if you do not take any corrective action to repair eventual consequences. So, make a commitment to rectify the current situation and do not hesitate to ask your colleagues for advice during this process. Subsequently, submit these ideas for internal approval.
Learning the lessons is key to any experience, positive or negative. If you learn nothing from the mistakes you will inevitably commit, you will eventually put your career in jeopardy. Once the problem is understood and a solution has been reached, implement a process to keep that from happening again. Additionally, follow-up on the corrective action to guarantee neither you nor anybody else in the organisation repeats that same mistake again.