Shopping might feel good after a bad day, but you're doing more harm than good if you're spending money beyond your budget. There are questions you can ask yourself when you're deciding whether or not to make a purchase, but after a bad day those questions might fly right out the window. The best solution is to steer yourself away from going into stores in the first place.
Here is a trick that has come in handy for me: Add up the cost of everything that you are currently wearing. Start with your shoes and work your way up, estimating the price of each item and adding those numbers together. The awareness that you spent x amount of money on your outfit, but are considering shopping for no reason, can help deter you from buying things you don't need on a mood-driven shopping trip.