I’ve formatted all my ebooks and print books myself using various tips and tricks I found online and LibreOffice. LibreOffice is a free, open-source office suite that works on both Windows and Mac. It does everything I need it to do to publish my books in every format. If you haven’t downloaded it already, you should seriously check it out.
For the versions of my ebooks downloaded directly from my site via the Newsletter signup, I use LibreOffice to create the PDF files by clicking the handy ‘Export Directly as PDF’ button on the toolbar. I use Calibre to generate the mobi (Kindle) and ePub (every other ereader) files. Calibre is also free to use, but donations are welcome. I use it in conjunction with LibreOffice .odt versions of my ebooks, which I format in a style that’s almost identical to standard Kindle formatting.
If you are a Mac user, I’m hearing great things about Vellum, which can create both ebook and paperback upload-ready formats. (It’s currently Mac-only and a paid $$$ program.)
Some helpful links:
Formatting posts from my old blog (Please note: Some of this info will be outdated.)
Smashwords Style Guide (Ebook)