I know what you mean, OP. Gradually being able to afford less and less as prices rise and your income doesn't, is depressing. I think it's having the option removed that is the issue. It's not about a piece of cake or a coffee in a cafe specifically, it's about not being to treat yourself to a little luxury any more.
I was a single parent for many years and that situation was the norm for me. And mostly I didn't mind too much but sometimes it just gets to you that you can't afford to do anything, ever. You don't have that option of choosing to be a bit frivolous occasionally.
What I did learn is that there are often cheaper ways of doing things if you're willing to be a bit creative. I know to some extent that's not the point, but it's at least an alternative to being pissed off. For example, like many people during the pandemic, I took more interest in my garden. I'd had a garden for years and barely used it. I was amazed how it improved my mental health during covid, and I'm still a very enthusiastic gardener. But a combination of starting during lockdown and not having much money means I've had to be resourceful and do things as cheaply as possible. I could have been resentful and pissed off about that but I chose to embrace it and challenge myself to grow things from seeds (still cost money but much less), find cheap or free plants and all kinds of other things on Facebook marketplace and car boot sales (after lock down, obviously) and those sorts of places, then learn how to propagate those plants myself, etc etc. And unexpectedly that has been a lot of the fun of it and made it much more rewarding, in that I've achieved something more special (to me) than if I'd had the means to go to the local expensive garden centre and spend a fortune and just buy whatever I wanted. Or even spend a bit at the expensive garden centre. 🤣 (I do go there but only to check out the bargain section. 🤣) I'm also recycling and reusing lots of stuff that would have otherwise ended up in landfill, and I'm getting lots of (free) exercise too. And I've also realised how extremely fortunate I am, and have been, to have a garden at all.
You might not be the least interested in growing things but I'm just using it as an example of changing your way of thinking when you can't change your financial situation. The library (and also charity shops) is another good example of this. Saves you money and does a wider good. Social media definitely makes everything worse, with so much advertising promoted as ordinary content, and so many people posting apparently perfect houses, gardens and lifestyles. Even though we all know most of it is fake, it's still hard not to get sucked in.
Sorry if I've sounded all Pollyanna and irritating, but it's more that I know how easy it is to just feel pissed off and sick of not having enough money. If you are lucky enough to have access to a green space for your next walk with your friend and took a flask of tea or a bottle of soft drink and some homemade sandwiches and a KitKat with you, maybe you could enjoy the company and the warmth and being in nature and it would help? And maybe try to think differently about what constitutes a treat?