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!