Don't know what to do or how to feel

My boyfriend of two years has not been wanting to have sex with me for the past week and when ever I try to start stuff he just stops. We went from having sex at least once a day to nothing and today I found out that he rather just masterbate instead I am so hurt right know I don't know what to do. I just feel like hiding myself from him because oblouisly I'm not what he wants right now.