How to use an item in my off-hand?
The item in your offhand can only be used for it's right click function (i.e. eating, placing blocks, blocking with shields).
Note that when you right click, the game first tries to use your main hand, and if the item in it does not have a right click function (or that function is inapplicable where you are targeting), checks your offhand. The sword can no longer be used for blocking since 15w33c, so you can use things together with sword and most tools.
For the left click function, only your main hand item can be used.