The key ingredients in bear sprays are capsaicins (reference), which are also the key ingredients of classic pepper spray. Cleaning bear spray off of you or your gear is similar to cleaning pepper spray off you or your gear.
First off, it capsaicins can be an extreme irritant, and so you want to minimize harm. Stay calm, avoid rubbing affected areas or spreading the mess, and get to a well ventilated area to relieve irritation. Capsaicins themselves don't directly damage your skin - they excite your nerves as if you're being burned though, and the inflamation your body reacts with can actually cause damage in extreme cases. Minimizing your inflammatory response minimizes damage.
You'll want to neutralize and clean off the capsaicins. The internet says dairy products like milk and yogurt can help neutralize the burning sensation of capsaicins on you, but you are unlikely to have a bounty of that with you in the wild and that doesn't solve the problem of attracting bears. Capsaicins are not very water soluble, so you'll need to add something to the rinse-scrub-rinse process to remove the capsaicin oils from you or your clothing. Dish soap does this well, or any other detergent normally used for removing greases and oils. If capsaicin is on your skin, other oils can be applied to pickup capsaicin oil that hasn't yet been absorbed - vegetable oil, facial cream, petroleum jelly would be rubbed on the affected area, then washed off as you'd wash them off normally. Capsaicin oils are very soluble in alcohols, so if you have high proof alcohol that can be used to clean capsaicin from you or your gear.
As for attracting bears...I'm not sure whether dish soaps will attract them. It is possible, depending on the chemicals and scents used. I wouldn't expect the high proof alcohol to attract bears, and since capsaicins are very soluble in that, that is the ideal cleaning solution. However, how accessible is that in The Great Outdoors? Probably, not very. I'd say if you get bear spray all over you, and wash it off enough to reduce irritation to you, you should take other measures to avoid bears (eg. get out of bear territory) - this could be doubly important if you are now incidentally all out of bear spray!