It's okay to break things off with someone when you decide they aren't a good match for you.
Your decision has come hastily due to an emotional event and your judgment is clouded without taking the whole relationship into account.