I don't believe one has anything to do with the other. First of all, the timeframe doesn't match up: "a number of years ago" versus "two years." Secondly, you felt bad about the thought and released the spirit.
It wouldn't hurt to cleanse yourself and your home with a sage bundle to get rid of all the negativity surrounding you. Drink lavender tea to purify yourself and your body. Get a white candle and inscribe the name of your ex on it along with words "I AM SORRY." Hold the candle in the palms of your hands and think about your ex with positive thoughts, and remember the good times you both had. Focus on your breathing for a few moments and then say something like:
I take back the negativity I sent to you
I release all emotions and attachments too
For my hasty actions, please forgive me
As I will it, so make it be
Light the candle and the let the energy flow!
Next you'll need to do a get a job spell. Please read my response to Anonymous from VA for some suggestions.