Do you feel the doom related to yourself or related to the future of humanity? If it's the first - I can't think of something else than having a money safety net for 6-12 months and having a flexible mind. You can try to learn just in case some phisical skills like electrician if the doon feeling is that bad. If you feel doon for humanity's future, I don't want to be mean, but you shouldn't worry about things you can't control, try to spend more time with nature and with ppl that spend time close to nature
Related to competition - the same thoughts people had when thinking about roman/any empire, how could it break, how could others compete. In the end everything ends, giants like IBM are just shadows of their past success, some are saying google is the next ibm and probably openai will be the next ibm-ed google...