The best you might be able to do (with a bit of technical knowledge and luck) would be to send a replacement transaction to yourself that spends the exact same outputs. If you can get that replacement transaction confirmed, then the original transaction will become invalid.
Following on from this, if the transaction is large enough (worth the fees).
1. Load up the wallet you are using and locate where the private keys are stored, get the wallet clients to show the corrosponding private key to the address(s) you used to send the transaction.
2. Download a mobile wallet onto your phone or another wallet onto your computer.
3. If you're using your phone, click "Sweep Paper Wallet" and scan the QR code on your computer (it'll be useful to know that once this is done you cannot use the bitcoin again).
OR
If you're using a different wallet on your computer, load the private keys up in plain text and merely click an import button on the wallet and paste the private key in there.
4. On your phone/wallet on your computer, you can then send this transaction back to your original wallet (noting that the address you use will have to be different from the first as the wallet will have marked the first address as not being secure as it has had its private keys shared with another device.
Either that, or if you know the transaction will not confirm, you can try to wait for it to cancel itself.
wow, thanks for sharing! didn't knew that one!