Prioratize:
1. see if there is a reasonable chance of escaping. If this is possible see 5, if this is impossible/fails see 2.
2. stand your ground and keep whacking, try and get swallowed and use the tree expansion trick. If this works see 4, if this fails but you are swallowed see 3, if this...