Compassionate meditation has been tested pretty well: https://pmc.ncbi.nlm.nih.gov/articles/PMC2944261/
...so: Praying for yourself is indeed useless to you, so prayer is useless to the selfish. Praying for others, sincerely, will help you.
Ain't that grand!
The "official" way to pray outlined in the Lord's prayer isn't selfish (other than asking to have enough food to get through the day), and is asking for redemption / forgiveness rather than specific goodies. This is the right way to do it.