Some options for melee combat...
Shielding obviously. Use it to predict and punish. When shield grab isn't guaranteed (you should be able to measure this in a second whether or not a shield grab can land) f-tilt works. D-smash is an iffy Oos option: long range but expect to get punished if they perfect shield it.
As for approaching (because camping isn't the only thing Samus can do,) dash attack and dash grab/pivot grab works well on the ground.
Aerial option include b-air to u-air ---> u-tilt/u-smash/f-smash/jab combo (the final option will depend on how both you and he land.) Or, b-air to n-air, followed up again with many options. YES, YOU CAN PERFORM THESE AERIALS IN ONE SHORT HOP. Therefore, rather than attempt a sh ff u-air (therefore approaching from diagonally where they can f-air you,) it'd be safer to attempt a b-air followed by an u-air (or n-air. Again, it will depend on where you land after the b-air: in front of them or behind them. If behind them, may want to try a n-air as it'll auto-cancel and you can follow up easily.)
For spacing options, Samus has good aerial options as well. A backwards sh z-air or f-air works well (depending on the size of the opponent, you may want to make the hop for the f-air higher to avoid punishment. D3 comes to mind. You can have the last hit of f-airs hitbox touch D3 without getting grabbed.) Retreating into a pivot grab can work at times too, although use this on occasion.
On a side note, because Samus's backwards sh is a somersault animation, this can easily be used as a mind game. You can sh backwards and DI right into a f-air, z-air or n-air or be aggressive and auto-rar into the combos stated above.
Overall, if you're going to have do deal with the enemy up close, make sure you space yourself correctly so you're away from a possible grab. I cannot stress how important that is. With such spacing, shield becomes a powerful tool and that mid-range distance is where you can still excel with Samus's long hitboxes. If you do happen to get too close, I would seriously recommend just retreating asap (even if it means rolling away. -gasp-)
EDIT: I'd like to mention nearly all of Samus's aerial options become less effective or simply null and void (NOID XD) against short characters. Retreating f-air becomes more punishable and you won't have enough time to input both a b-air and u-air/n-air when approaching. But, short characters have short grab ranges as well, so use to your advantage.
For example, against MK, space yourself far enough from a grab but close enough for a his f-tilt and sh f-air (both of which you can punish.) Watch out for his d-tilt and don't forget to use yours. (Worry less about refreshing and more about not getting tripped into a grab by MK.)