Before you try to get him back into your life, you have to deal with the rejection issue. If you haven't dealt with it, it could lead to more problems. First of all, work on accepting and loving yourself. Don't feel worthless or have low self-esteem about yourself.
Secondly, your ex has to deal with his depression. If he hasn't, he won't get back with you. If he does get back with you, it will also cause problems in the relationship. Thus, he has to deal with his depression.
This means you have to give yourself and your ex time to work out on your areas before you try to get him back.
It will be good to ask your boyfriend to forgive you. This will partly help your boyfriend to overcome his depression. Also, it will make you feel good about yourself which will further boost your self-esteem.
Let him know you love him and that you're working on improving yourself.
This translates to not contacting him for a month. This is to give both of you your own space and to work out on things that are troubling you. After that period, you will have a clear picture of what to do - move on or try to get back your ex.