Mainstream publishing and self-publishing can't be compared as similar outlets for book publishing. If you self-publish, you can have your own book with your name on the cover in as little as a month, and you will have all the copies stored yourself so you have easy access to them to market. However, you need to think through the underlying reasons for writing a book. If it's so that you can tell people you've written a book and show or give them a copy, then self-publishing or print-on demand is the way to go. If your reasons for writing a book are much different, then consider these factors about earning the rights to a mainstream or traditional publisher. Mainstream and traditional are used interchangeably to mean the same type of publisher.
Though it is difficult to get a traditional publisher to accept your manuscript, having a traditional publisher jumpstarts your credibility to virtually everyone. People in the industry know that if a traditional publisher took a chance on you as the author, then there must be merit to your work.
When you use mainstream publishing, you may be able to get an agent to shop your manuscript to publishers. Publishers like to work with agents they respect, so if you have an agent, the publisher already knows your manuscript has gone through the weeding-out process. Agents don't accept self-published books.
With traditional publishing, experts cull through your manuscript for cohesiveness, viability, wordiness, grammar, etc. You can't turn in sloppy work, so all the above has to be as polished as possible before it will even be looked at, let alone considered, but there are experts who deal in these areas who can make suggestions and fine tune.
Cover art is typically far more professional looking when going with a traditional publisher.
The over-all feel and look of your book is typically more professional with a mainstream publisher than with other means of publication.
Bookstores will carry your book if traditionally published because they know if it doesn't sell, copies can be returned.
Bookstores also know if your book is published by a mainstream publisher, that the book has been through many hands, many committees, and many trials in creating a viable book. Bookstores know there probably won't be glaring errors in the book--it's been through the refinement process to make it the best possible book.
Marketing will be thought about before mainstream publishers accept your book. Marketers know if your book stands a viable chance of selling.
With mainstream publishing, you "might" have some marketing done for you. However, as the industry has changed, the onus of marketing needs to be done by the author.
If you've had one book published by a mainstream publisher, more writing doors open for you as an author. These publishers want authors who have more than just one book in them, so your chances of getting more books accepted by mainstream publication are far greater.
Big-name media will usually not hesitate to interview you as an author, if your book is done through mainstream publication. TV and radio stations looking to interview authors may approach you to be interviewed.
By getting accepted by mainstream publishers (whether it's big houses or smaller publishing houses), it can provide the author an often much-needed boost in confidence because he or she knows someone is willing to take a chance.
It will take much longer to find mainstream publishing. Profits may be very small (some authors never earn past a small royalty paid up front). Yet, if viability and credibility are what you want as an author, think about the adage: "all good things come to those who wait" and work at the writing craft and study the industry.