I tried to put my pet rat out of its misery by bashing its head in as I had seen done at pet stores. It lived through it and suffered.
Why didn't you finish what you started? What made you want to bash your rat's head in?
I was trying to end its suffering.
Causing your rat to suffer is terrible. If your pet rat is sick and suffering then you should let a vet put it down in a humane way, not try to do it yourself.
I know, but I didn't have the money for an euthanasia.
Your pet should be given love and care. This act sounds like mercy but you weren't able to complete it. If you want to end your pet's suffering, the only reasonable route is to take it to the vet.