I think I'll diverge from the majority here, and even disagree with Crothian

and say that the party ought to sell it. This is because the utility of magical items relative to the cost have a very strong diminishing returns curve.
Essentially, this is due to the squaring of the plus to give the cost, meaning that one high-priced item is of similar cost, but less utility, than multiple lower-priced items. In this instance, selling the warhammer, which in most cases merely acts as a +2 warhammer, enables the fighter to get a +1 weapon, +1 shield and +1 armour, the rogue to get Gloves of Dexterity +2, the wizard to get a Headband of Intellect +2 and the cleric to get a Periapt of Wisdom +2. The aggregate usefulness of all of these items is likely to substantially outweigh the possible utility of the single weapon is nearly all cases. For the fighter alone, he is taking a -1 to hit and damage in exchange for a +2 AC which is a reasonable trade-off; whilst the benefits to the others are pure gain. Alternately, the cleric could relinquish his Periapt, the fighter could purchase some Gauntlets of Ogre Strength and, unless against undead, there is a net gain of +2 AC (for the fighter) as well as secondary benefits of increased Strength, +2 Dex for the rogue and all of the associated advantages and higher DCs and extra spells for the wizard.
Waiting for the other party members to catch up means that during the interim between the acquisition of the item and the catch up period, the party is operating at a substantially sub-optimal level. When every combat could be lethal, I'd go for jam today rather than the possibility of some jam at some indeterminate time in the future.