I remember when my niece was little, playing with our landline phone, she asked "Can I telephone God?" It is through prayer that we do this, isn't it? We "telephone" the heavenly Being up there and chat like we would with our best buddy. Prayer is not just thanking God for all the good blessings. It is also our communication line through which we can unload our emotions, happy or sad. You see, it gives us a nice feeling within our heart & mind that there is somebody out there listening and, best of all, who does not pass judgement or react in a bad way even when we unload anger, too, sometimes, asking why God was unfair. It feels good to unload to an unknown entity!
When people come at you with their worst, you should come at them with your best (advice given to Selena Gomez by her mother, quoted in Time magazine.)