Sorry to hear about your pain.
First, you likely aren't doing Handstand Push-Ups if standing overhead presses cause you pain. A handstand push-up require an elevated surface (like parallel bars or rings) which allow you to descend to the point where your shoulders reach the level of your hands. What you are likely doing is Headstand push-ups.
Second, you should NOT pack your shoulders when pressing overhead (be it with dumbbells, barbells, kettle bells, or bodyweight). The shoulder joint is actually two joints:
1) The Glenohumeral joint (where the head of the humerus meets the scapulae/glenoid fossa)
2) The Scapular/clavicle sternum joint
Together the two joints create movement known as "scapulohumeral rythym." In other words, the two joints are supposed to work in conjunction to create movement of the upper arm.
During overhead movements the scapula are supposed to undergo a movement called Upward Rotation where the top of the scapulae pull somewhat upwards and inwards towards the spine (similar to Elevation) while the bottom of the scapulae pull away from the spine (similar to Protraction).
Attempting to force the shoulder blades down and back ("pack" them) while pressing overhead interferes with this natural Scapulohumeral rythym and can also put the glenohumeral joint at greater risk for impingement (such as the Biceps tendon).
I would suggest trying some lighter overhead presses while not packing your shoulders and see if that still causes you discomfort. If it does, then you may have some biceps tendinitis and unfortunately the only remedy for that is to rest the tendon(s) and stretch them until they are healed (which could take as much as several months).
If however allowing the shoulder blades to move as they should alleviates the pain, then lucky you, you should be able to continue pressing overhead. I would still strongly suggest stretching the biceps, working on shoulder extension ROM, and shoulder Flexion (overhead) ROM if those are lacking though as your overhead pressing longevity is often going to be directly related to how well you maintain proper muscular balance and mobility within your shoulder joints.