Your first step should always be to distance yourself from your ex and this is an action to preserve your sanity as much as it to make a statement to your ex boyfriend. This step will stop you fixating on your ex and give you the space to concentrate on your own needs and requirements to help you get through this stressful time.
Make a serious attempt to reconnect with your family and friends and accept any help that will undoubtedly come from those who love and care about you. If you're serious about figuring out how to get your ex boyfriend back it would be a huge mistake on your part to isolate yourself. With people around you it means you're not sitting at home crying and obsessing about the breakup of your relationship or your ex boyfriend.
Now, as you're spending time with family and friends, find out from them what they saw as the downfall of the relationship. I'm sure your boyfriend would've told you what he thought as he walked out, and you no doubt have your own ideas on what went wrong and why. However, sometimes it takes the perspective of an outsider looking in to make sense of a relationship. So if you seriously want to figure out how to get your ex boyfriend back then ask others for their opinions.
Your next move is to make sure that given what you've heard back from family and friends regarding their take on the breakup, that you now think for yourself. You either agree or disagree with what's been said and of course you're doubtless going to get different opinions from them all. So take some time to weigh up what's been said and the final decision is yours. Yes you started out wanting to get your ex boyfriend back, but is it still what you want? Perhaps you've heard some 'truths' that now put that quest in doubt? Perhaps you've had time to come to terms with the breakup and you can more readily accept it? Whatever and wherever you are, be clear on what you want before you make the next move.
If you're still determined to go ahead and win him back, then your next move is to call him and to do so calmly and without emotion and drama and talk to him about the way you feel.