Actually, there are 3 different meanings of vain.
1. excessively proud: excessively proud, especially of personal appearance
2. unsuccessful: failing to have or unlikely to have the intended or desired result
a vain attempt to escape
3. empty of substance: devoid of substance or meaning
My life is vain.(2)