Currently our equipping system is very simple and limited, so there is no built-in way to do this.
That being said with a bit of custom code you should be able to achieve this.
If you are equipping items using an ItemAction, create a custom ItemAction by duplicating that code.
Then modify it, such that you check if the item being equipped is of the two handed category.
If it is unequip the item in the second hand first