401k Withdrawal before age 59.

Is the money I withdraw from my 401k before age 59 treated solely as regular income or the gains from the stock's increased value treated differently as capital gains?