Suspending worry for the future might be a plausible function for religious experience as an evolved feature of the human mind, yes.
I would also point towards the biological fact that while the existence of a higher being, consciousness or reality, is still ineffable, even after having had an experience that felt like there might be one, there is also an empirically true, measurable interconnectedness for humans that can be tapped into.
We live, and have evolved, in and through ecosystems that highly depend on interconnected species and processes that are so complex and intricate that we are still working on fully grasping them, and still discovering new connections (unfortunately, it's becoming more and more because we have disrupted the connections by environmental damage, and the ecosystems start to fail due to that, making the connection obvious only after it ceased to exist). Connection between humans in the form of love in its many forms is also the ultimate glue that keeps societies together, and if that capacity diminishes due to circumstances, bad things tend to happen.
The myriad of connections we need to live, and to thrive and to feel like we are whole - all of this fully seen and experienced in their abstracted totality could in my eyes be one of the bases for religious experience.
And if that is true, it gives also another function - then, religious experience is the anchor and has a rebalancing function that makes sure that we don't get lost in our own heads and human constructs, and keeps reminding us that we are part of the ecosystem, too, and keeps us from using it in a self-destructive manner. There are several deeply spiritual, nature-connected societies that only became so after a local environmental crisis caused by themselves. Tapping into the interconnectedness through religious experience has helped them find another, arguably better way.
(Of course, it doesn't seem to be a hard, global fail-safe in human history, given the current state of the world, so I don't know how direct this function would be.)
I've been there, as well. Luckily (or something like that), I'm sufficiently poor to be noticably anxious about spending more than 200 EUR in one go, and with that managed to convince myself that now that I know the parts and their price, I can hold off until I have accumulated half the extra funds by saving (drew up a saving plan and everything as the last step of obsession, and then re-focused on saving).
That was in January. I have stopped tracking my money and actively saving for this by April, and now the new PC build is again just something I wanna do some day, but not right now.
Negotiating with myself to first work towards possible and reasonable, but ultimately unlikely financial circumstances, and then predictably running out of steam, is my go-to strategy for expensive stuff I really want right now, but don't actually require to fulfill a need. Works surprisingly well!