My baby sleeps only in my arms. What can I do to break the habit?

Stop. How can he get used to sleeping anywhere else if he never has the opportunity. Crying does not equate with pain. Put your baby in crib or bassinet and calm him there instead of your arms. Keep things the same, routine is very important , they get used to things quickly.
Ear phones/plugs. Put your kid down and get a good set of ear plugs or ear phones. Check the kid visually every 15 minutes as needed. Delivery should be the moment you begin to separate from baby, if you don't start now when will you? Baby doesn't need you this much, you've trained it to do what it's doing. Train it to do something different or live with it.