i dont know your exact situation, but there's probably a reason (obviously) behind this. I forsee two circumstances:
1. he actually is depressed, and he feels like he needs to punish himself more by getting rid of people that are nice to him aka his girlfriend. I don't think its very likely since you said he went out with his friends right after or whatever.
so this leads to 2.
he is bored of you. or he is annoyed with something you do. Have you been pushing him to get a job everyday? Do you put a lot of "unnecessary" pressure on him to do stuff?
sometimes it really is just cut and dry as he's kind of had enough of you and wants to find some other girl he might like, which is why he went out with his friends over the weekend to get back in the game. But, you werent exactly specific as to where he went, so i'm just guessing he went to a bar or something.
but if the 'reason" he told you he broke up with you really is the "reason" it might be because he wants to make sure he has enough money to buy food for you or whatever it is you guys do when you go out. It can emasculate someone to have their girlfriend paying for themselves if they feel like they have to be a "man" in the relationship rather than being an equal.