Don't ever volunteer that you were terminated on your resume. If you do that, you are sending a "don't trust me" signal to a prospective employer without giving yourself a chance to explain yourself and put your termination in context. That's called shooting yourself in whatever body part hurts the most.
In general, whether in your resume or at an interview, don't disclose anything bad about yourself without giving yourself an opportunity to respond. Otherwise, you just doom your chances and you are doing it in a way that is unfair to yourself - You are being your worst enemy here.
If a prospective employer does not ask why you left your last job, don't volunteer the information. If the prospective employer does, prepare two answers: (1) a one-sentence answer that, if it applies to your case, will say "I made a mistake on the job" and that will fit on an HR form, and then (2) a two-to-three sentence paragraph that will go into just enough specificity that the interviewer knows what you are talking about, how sorry you are that you made it and how it has been replayed again and again in your mind. But do not flagellate yourself. What's done is done, move on.
You want to be succinct in your explanation. Long, extended explanations are counter-productive, and you might be tempted to give long, extended explanations if your boss was a jerk. Don't give in to the temptation because the more verbose the explanation, the less credibility you convey. Even if your narrative is completely true. Because you look like you are justifying yourself. Don't ever look like you are justifying yourself at an interview. You'll just be creating skepticism on the part of the interviewer. You should think of this awkward moment as an opportunity: an opportunity to sell yourself as an employee and person who can be trusted. Don't miss that opportunity.
It's not what you say that matters but how you say it. You can say that you were fired because you got in over your head, but then you should balance your disclosure by saying that you have gotten better since and if you were as good back then as you are now, you wouldn't be fired. You can say that you were fired because you made a mistake in judgment, but then you should balance your disclosure by saying that you have learned from your mistake and if it is necessary to say it, that you are a far more emotionally mature individual than you were back then.
I repeat: do not say anything bad about yourself without balancing it out.
I repeat: when you disclosed on your resume that you had been terminated, you were on a suicide mission. Don't do that.
I wish you good luck. Nobody should be punished for being terminated as severely as you punished yourself. And I am saying this because I may have done worse things than you did, and I am still around and thriving :)
You need to learn how to handle yourself after being fired and I am sorry to say it, you haven't learned yet even after two years. It is absolutely important that you do. The fact of life is that people get fired all the time and they recover from being fired all the time. You need not let the consequences of being fired two years ago turn into a death sentence for your career - a death sentence that it doesn't deserve.