with an excessively high opinion of one's appearance, abilities, or worth
I stared at myself vainly in the mirror
they were vainly looking at old videos of themselves
in a way that produces no result; to no avail
I was vainly trying to get to sleep
she searched vainly for a pulse