Is it okay to not be in a relationship with a guy, yet have sex with them?

I just had a bitter breakup and I don't want to even think about being in a relationship, but I want to have 'relations' with a guy. Problem is that I've never done things with a guy who I wasn't dating and I feel like if I do, I'll become an emotional wreck.