Obsessed with being laid off

I was recently laid off from a job for the first time in my life. It was a challenging position in a complex field I was excited to work in. I gave this job my all, despite the very disorganized work environment and a hostile trainer (I was being trained by the woman I was going to replace and she was not happy about it.) After training for several weeks, I got a call saying they were “reducing hours” and I was being laid off. However, on my last day of work my supervisor was horribly rude to me and I felt like I must have done something wrong.
I cannot seem to stop obsessing about losing this job. I was trying so very hard and know for myself that I could walk in and take over the job tomorrow. I feel rejected and want desperately to know the untold details about my layoff.
How can I stop obsessing about this situation?