I put some suggestions here
viewtopic.php?f=20&t=20246&p=156685#p156685and although everyone quite rightly says to learn to duck dive or turtle roll, I couldnt duck dive my board (long board) no matter how hard I tried and am still working on turtle rolling. Anyway, grabbing the nose of the board and sinking yourself down will help in white water, if your grip is strong enough. Its better than abandoning your board. Even if its not really what you should ideally be doing - think of it as a temporary work around.
If the wave is breaking on your head, you are just in the wrong place at the wrong time. Look for rips or channels (where the waves are lower) and paddle out there and around to your break; or paddle hard between sets, as others have mentioned.
As to swimming in, learning to body surf is a good idea, as are general life saving techniques (floating on your back, treading water, relaxing and taking things slow). In addition, and depending on your beach, have a look around for 'exit points'. For example, you may be able to swim over to a headland rather than have to swim back to the beach - but be careful with this, as even if the waves arent breaking there will be a swell and the last thing you want is to be washed onto rocks. However, sometimes there will be sheltered areas that face away from the swell direction and can be used.
If things are really bad, ask another surfer to help out - the old guy (or gal) with the long board will usually be your best bet.