Relationship Problem!

Today my bf was upset about something and when I ask him what's wrong and start cussing me out and telling me to leave him the F alone and when that happens I don't know what to do.. But he can talk to other people about his problem but not me. What should I do?! This has happen more than once