The greatest mental wealth is confidence, which if you have you will have all the world.

这么写可以吗?

The greatest mental wealth is confidence, which if you have you will have all the world.

定语从句本身是一个含有条件状语从句的主从复合句。关系代词which指代先行词confidence,在条件状语从句中作宾语,因为要引导定语从句,故移至定语从句之首。这个句子是没问题的。