Getting back your ex boyfriend after you have messed up, may seem like an impossible task. You wish you could go back and do things differently, but that can't be done. Wanting to change the past will not help you because what is done is done and you have to live with it, but you don't have to let it keep you from having a happy life with the man you love. You have to show him that he can trust you again and that will take all of the patience you can muster.
Doing something that causes another person to lose confidence in you can shake your own confidence as well and the severity of what you have done can determine how hard it will be to get your ex back. If you lied to him repeatedly or he caught you cheating, you will have to prove to your ex that you have completely given up the relationship you were having. If you threw temper tantrums and made accusations toward your ex boyfriend that will take a lot of work too.
Since he was deeply hurt by your actions, you can't expect to simply apologize and have him forgive you. In the first place, it's too easy to just say you are sorry and your ex boyfriend probably won't believe you anyhow. Why should he? He will feel that you will just do it again. Another thing you must do is look at the way you feel about what you have done. Are you sincerely sorry that you did it or sorry that you got caught? Do you realize how much you have hurt the person you supposedly loved the most?
You will have to be prepared to answer these questions because if you apologize to him, these are questions your ex boyfriend will likely ask you. How are you going to answer these questions and make him believe you? The answer to that is, you can't. The only way you will be able to rebuild his trust is by showing him that you have changed and that won't happen overnight. You can't blame others for your mistakes either, you have to take the responsibility for your own actions.
Getting your ex boyfriend to trust you again will require you to swallow your pride and you are going to have to change your behavior patterns. Even if you get your ex back, he will be suspicious of your every move. You can't object if he wants to check your cell phone and emails. You are on trial and he may demand to know of your where you are at all times. You will have to accept these things if you want to rebuild your ex boyfriend's trust.
If you make the necessary changes and don't mess up again, in time the disappointment he is feeling toward you will begin to fade away. You will become a better person for having this experience and you will have that future with the man you love.