If there was a pill for that, how many masterpieces like the Sherlock Holmes books would never be made? The products of misery have always been the devil's advocate's best arguments. If Doyle had not sympathized with Holmes' afflictions, he could not have written him. Or if he had written Holmes as a Mary Sue we wouldn't have cared. (Though for some reason it worked for Harry Potter.)
An effective education requires a certain amount of torture, and it works better when self inflicted.