Shoot some LPS3 or CorrosionX on the sender unit -- on the motor mounting bracket. However, if that doesn't work you may be SOL if the salt water has been inside too long.
Raise the motor up all the way, spray it, then watch the guage as you move the level up and down.
sounds like the trim sender cam it is plastic and when it cracks the trim gauge will not work.you can order a new one. I think Yamaha has a metal /aluminum upgrade. Here is a link to order a plastic one or go to a yamaha dealer. it is # 1 on the diagram