The title of James Thurber's short story is, indeed, appropriate.
Walter Mitty is a failure in life, and he attempts to deal with his fears and challenges by retreating into the "secret life" of his imagination. Sadly, however, even in this self-created world of his imagination, Mitty fails until he finds himself facing a firing squad. Nevertheless, the efforts of his imagination to escape the vicissitudes of his world are worthy attempts. For, Mitty imagines himself in prominent and heroic roles in which he can affirm some self-esteem. Unfortunately, his overbearing wife or someone else interrupts him just at the moment of his most valorous acts. Consequently, Mitty's dreams become as ineffectual as his acts in real life.
For instance, as he waits at the hotel for Mrs. Mitty, Walter hides in a winged chair, losing himself in the "secret life" of his imagination. As usual, in this daydream he is in a position of power: Captain Mitty buckles his gun belt with the Webley-Vickers automatic weapon in its holster as he prepares to leave the dugout to fly a bomber in order to blow up an ammunition dump. But, just as the hero departs, calling out "Cheerio!" there is an annoying tapping on his shoulder that pulls him back into disappointing reality in which his termagant wife scolds him.
His self-reliance defeated, Mitty's final daydream is of a man facing a firing squad. Now, his "secret life" is revealed as more than just imagination; it is the expression of his repression as a man.