I'm sure you've heard the joke: be careful not to tick off a writer, she might turn you into a character and kill you. It's pretty common for authors to create characters based on people they've run into in their daily lives. Maybe they borrow aspects from them (an interest, a talent, a job) and insert them into new characters in their books. But what about turning yourself into a character? Is it a good idea, or are you running the risk of making the book too personal?
Memoirs and biographies aside, writers generally try to create new characters for their books rather than inserting themselves or their own life stories into the pages. However, this trope can be pretty common in the fanfiction world. People fall in love with a movie or book and dream about wanting to live in a world with them, so suddenly author Jenna becomes Harriet in the book with possibly the same appearance, likes, and loves as the actual author, with some embellishments (maybe the character is prettier, more popular, etc). It comes as no surprise when she becomes best friends with the main characters. This is how Mary Sues and Gary Stu sometime come into existence.
Now, that's not to say that a person's life makes them a Mary Sue/Gary Stu, but it's a common factor when someone puts themselves in a fanfic work. Long story short, "Mary Sue is a term used to describe a fictional character, usually female, who is seen as too perfect and almost boring for lack of flaws, originally written as an idealized version of an author in fanfiction" - Dictionary.com. Gary Stu is the male equivalent. These types of characters appear in non-fanfiction work as well (there have been arguments about whether Luke Skwalker or Rey are Mary/Gary). So if you decide to write yourself into your story, be careful to avoid these kinds of tropes. There are a ton of quizzes that you can take to find out if a character qualifies as a Mary Sue or Gary Stu.
Other ways people write themselves into stories is to make themselves a person that they want to be. Perhaps the author struggles with anxiety so he creates a powerful character who isn't afraid of anything. Someone may feel like she's not beautiful so she designs her character the mirror opposite. It's a writer's way of seeing themselves in a different or "better" light. While this isn't inherently bad, it can still lead down the path of a cliche character.
When it comes to my own writing, none of my characters are exactly like me, but some of my personal traits do end up in some of my lovelies. That's not to say that I'm trying to make myself into a character, it's just both more meaningful and a little easier to write about someone who has had my experiences. For example, Tess from PDD and Wolf Pit, struggles with anxiety (maybe not to the level I do) and we take the same medication. She also loves musicals, especially Sweeney Todd (shout out to my dad who introduced it to me). Am I Tess? No. But I took some personal parts of myself and added them to the character. In the third PDD book (don't worry, no spoilers), I'm developing a character named Evelyn who is obese 1. because we don't have enough of those characters represented in books and 2. because it's nice to see myself represented. Shen Yanlei, a new character in Wolf Pit, has a father who works at the Diamond Headache Clinic of Chicago. I chose that because I've been there for my own chronic migraines. Again, I take elements of myself and add them in, but I don't make the characters completely like me. I think it's fun to include those little easter eggs to see if people who know me catch it.
The danger of making a character after yourself is 1. you run the risk of making them too 1 dimensional like with Mary/Gary, and 2. if someone critiques your character, it becomes a lot more personal. How many of us clutch our books to ourselves like our precious children when people tell us something's wrong with them? It happens to everyone. Now imagine if you made someone after yourself entirely and a reader said the character was boring, unbelievable, or dumb. It's hard enough not to take that personally as the author, but to have it said about you in your own book? Ouch.
So what do you do? What if you really want to put yourself in a book, is it really all that bad? As with every writing element, how you do it determines a good or bad outcome. Maybe only include some elements of yourself and make the rest unique. Use your own personal experiences that can add flavor to the story rather than taking it over. Write it for yourself personally with not intentions of publishing it (goodness knows I have plenty of tales that will never see the light of day). Practice with it and see if close friends or family can point out whether this character is like you or not. If you turn yourself into a character and that person is unique, has a purpose, and fleshed out, then maybe it isn't a problem.
What about you? Do you write characters that resemble you? Do you think it's a good or bad thing to do?