Having gone through the loss of a job (more than once), I think one of the more important things that I learned was not to let myself get into the victim mentality. Victims aren’t in control of their lives. Don’t go there.
Maybe you didn’t see it coming, but stuff happens. Companies go through things that cause them to change. Sometimes that change involves the job that you used to have. Stuff happens. Jobs get eliminated. That doesn’t mean that you weren’t good at what you were doing; many times, it just means that the job you were doing no longer fits into the future plans of the company. Sometimes the job is still there but maybe it wasn’t a good fit for you (and maybe you just weren’t happy and it showed). Whatever the reason, that job and that time in your life are gone. Move on. Just resist the urge to play the role of a victim of that happens to you.
Victims are pathetic creatures who believe that someone or something is out to get them (maybe the whole world). They prefer to act pathetic rather than accept responsibility for themselves and move on with their lives. Don’t go there. It is a depressing and lonely place to be. I wore about this in a post on my blog about Being the victor, not the victim- https://normsmilfordblog.com/?s=be+the+victor