Well - I'd say you've taken the first step (which many people omit) - admit to causing the problem and focus on solutions moving forward. As they say - "the first step is admitting you have a problem" - and you'd be surprised at how much effort people will go to to avoid admitting it.
The difference between human error and gross negligence
With a really bad mistake, there's a difference between human error and gross negligence. The difference is usually the difference in following the process you were given to the best of your abilities and understanding and still making the mistake (human error) or willfully/ignorantly NOT following a process when you should have known better. For example, if you were supposed to get a code review, and you didn't - it's gross negligence. If you did get the code review, and both yourself and the reviewer missed it - it's human error.
In cases of gross negligence, this really could have job/career impacting consequences. The action that you can take is to do the process you are told to do next time, but in essence you've broken faith with your employer and they don't necessarily have a reason to give you a second chance. This can be pay cuts, lack of bonus awards, or even termination for cause.
In the case of human error - the consequences are usually less severe - you may still get a bad review, or loose your bonus - but if it's an honest mistake, it's much more likely you'll get a warning. If you don't habitually make bad mistakes, then you'll dig your way out of the hole with good behavior and your reputation will heal.
First step - trace through the formal processes of your company and identify any steps you may have missed. Being able to say to your boss "I missed this step, I found it, did the best I could to recover and have these plans in mind to change my behavior so I won't miss it next time" - goes a long way in terms of rectifying the bad impression. And if you have a case where there is no part of the process that would have saved you - look for opportunities to propose a way to improve the process - either for your self or everyone. One way to look at human error type mistakes is "this could have happened to anyone".
Look for patterns
Your reputation will recover if this is your only serious mistake for a long time. Everyone commits a really bad error once in a great while. The people who usually suffer long term damage to their careers are those who repeatedly cause problems and show no significant improvement over time.
To avoid being one of those people - look for patterns that could have led to the problem. Did you have all the knowledge you needed to NOT make the mistake? Is there other preparation/error checking you could have done? Is there a work/life pattern that led to you being at less than your best (over tired, under-fed, stressed about home life, distracted by interruptions, sick, under the influence of anything not prescribed by a doctor, etc)? Can you eliminate any barriers to thinking and focusing efficiently?
Cut yourself slack on anything that you can be relatively sure is not likely to recur - for example, if you were tired because you had just spent all night staying up with your child in the emergency room of a hospital, you can be pretty sure that that won't happen every week or month. However, if you were really tired because you have a weekly volunteer commitment that keeps you up late - you may need to rethink the commitment and find a way to get to bed earlier.
Admit, Correct, Move on
Once you've looked at yourself and the patterns in your work and done what you can to prevent the error ... admit it, fix it, and move on. You'll get a certain amount of negative feedback for a while - try not to be defensive. Prove your worth by making conscious changes to your processes. And don't let it haunt you. Quite often, I see people still bringing up their mistakes long after the rest of the office has forgotten about it - once you are forgiven, let it go.
Do ask for feedback, however, 6 months and 1 year after the event, check in that your work quality has been better and that there's nothing else you should fix or pay attention to.