You'd give away all your money to feel a little bit less sad?
If this sounds surprising to you then probably you have enough money that you don’t need to give all of it away to be less sad.
Honestly the main problem is one of efficiency not whether buying happiness with money is a bad idea. Being less sad is more important than having money, but you do need to plan ahead so you don't run out too quickly.