You aren’t the first to romanticize failure. Keats was way ahead of you:

Failure is, in a sense, the highway to success, inasmuch as every discovery of what is false leads us to seek earnestly after what is true, and every fresh experience points out some form of error which we shall afterward carefully avoid. – John Keats