In the patch, the gravitational force is balanced by the normal force. The net force is due to friction.
Actually, you don't need to know the mass. Once you look at the problem in its "entirety," the mass will vanish, so to speak.
The bug starts with some energy at the top, then loses some in the sticky patch, and then it goes to the other side with less energy than it started with, and hence to a smaller height. All you need to know is that second height, and then repeat the process again (and again).