Yes, you need to return it to the Retailer you purchased it from to replace it. But you might have problems if the Retailer is not very customer friendly. They may say that you were the one that bent the pins while trying to install it. You need to show or have some proof, as a precaution, that the Processor came damaged from the Retailer. If the Retailer is Amazon or Newegg you won't have a problem returning the damaged CPU.
I don't believe that AMD Warranty covers bent pins on the processor since they will say it was damaged by the User.
Really, the only choice you have is for the Retailer to replace your damaged CPU.
Good luck!