That is the plan. Imagine an app that can provide personalized pricing to extract just less than the amount that would cause you to go elsewhere?
It knows when you get paid and can splurge. It knows when you are drunk or high and have less self control. It's the digital pricing tags at the grocery store, but personalized to you (and not with your best interests in mind).
I think your comment is the key. Many others tell what to do, but yours addresses the core in that you won't be happy unless you decide or allow yourself to be happy (perception).
I used to mock those people who would say things like "smile in the mirror and tell yourself that it's going to be a great day". Later in life, I figured out that that's what they needed to do, so good for them. For me, it's something else. I need to be around nature to ground my feelings. Other times, it's physical cardiac exertion, like a bike ride.
Medication can help if there's a real medical problem, like depression. Self medicating can be dangerous.