I would recommend, generally, that you write what you read. Unfortunately, your writing will probably suck at first. Keep writing. It will still suck. Do it again. Repeat until you no longer suck. Trust me, I speak from experience. And from the experience of Timothy Zahn, John Ringo, and several other authors who discovered how to write the hard way --by writing.
That would lead to an obvious follow up: read. No, Vince Flynn is not an assassin, nor am I any of the above.
However, we all do research.
For my novels I read easily a dozen books worth of material. We will not include all of the various and sundry newspaper articles and websites and lectures that I had to go through to collect information on weaponry that I've never held, and tactics I've never had drilled into me, and places I've never been. And we can ignore the fight scenes I had to rewrite after taking 18 months of self defense training.
Third: sure, you can use your own experience. If it's relevant, if it fits, if it's part of a character. If you're writing romantic elements, it might be nice if you've been in love. If you've fired a gun, describe its feel, its weight, the sound it makes when it fires. If you're a colorful personality who made homemade explosives for grammar school science projects, use it. I don't necessarily recommend testing out the Anarchist's Cookbookβmerely reading it will suffice.
Experience is good. Relevant experience is better.
People talk to me. In my life, I have known seven rape victims. I once wrote a affidavit for a woman who was the plaything of a sexual sadist from age 8-22. I have dated a bisexual bipolar wiccan nymphomaniac (long story), a bi-Latina Catholic nymphomaniac (even longer story), and I have listened to more people with more kinks than I have ever wanted to learn about. I am a walking confessional and therapy couch rolled into one.