Let $f(n)$ be the smallest prime which divides $n^4+1$. What is the remainder when the sum $f(1)+f(2)+\cdots+f(2014)$ is divided by $8$?

$ 
\textbf{(A)}\ 1
\qquad\textbf{(B)}\ 3
\qquad\textbf{(C)}\ 5
\qquad\textbf{(D)}\ 7
\qquad\textbf{(E)}\ \text{None of the preceding}
$
1. **Understanding the problem**: We need to find the remainder when the sum \( f(1) + f(2) + \cdots + f(2014) \) is divided by 8, where \( f(n) \) is the smallest prime that divides \( n^4 + 1 \).

2. **Analyzing \( n^4 + 1 \) modulo 8**:
   - For \( n \equiv 0 \pmod{8} \), \( n^4 \equiv 0 \pmod{8} \), so \( n^4 + 1 \equiv 1 \pmod{8} \).
   - For \( n \equiv 1 \pmod{8} \), \( n^4 \equiv 1 \pmod{8} \), so \( n^4 + 1 \equiv 2 \pmod{8} \).
   - For \( n \equiv 2 \pmod{8} \), \( n^4 \equiv 0 \pmod{8} \), so \( n^4 + 1 \equiv 1 \pmod{8} \).
   - For \( n \equiv 3 \pmod{8} \), \( n^4 \equiv 1 \pmod{8} \), so \( n^4 + 1 \equiv 2 \pmod{8} \).
   - For \( n \equiv 4 \pmod{8} \), \( n^4 \equiv 0 \pmod{8} \), so \( n^4 + 1 \equiv 1 \pmod{8} \).
   - For \( n \equiv 5 \pmod{8} \), \( n^4 \equiv 1 \pmod{8} \), so \( n^4 + 1 \equiv 2 \pmod{8} \).
   - For \( n \equiv 6 \pmod{8} \), \( n^4 \equiv 0 \pmod{8} \), so \( n^4 + 1 \equiv 1 \pmod{8} \).
   - For \( n \equiv 7 \pmod{8} \), \( n^4 \equiv 1 \pmod{8} \), so \( n^4 + 1 \equiv 2 \pmod{8} \).

3. **Pattern recognition**:
   - When \( n \) is even (\( n \equiv 0, 2, 4, 6 \pmod{8} \)), \( n^4 + 1 \equiv 1 \pmod{8} \), so the smallest prime factor \( f(n) = 1 \).
   - When \( n \) is odd (\( n \equiv 1, 3, 5, 7 \pmod{8} \)), \( n^4 + 1 \equiv 2 \pmod{8} \), so the smallest prime factor \( f(n) = 2 \).

4. **Summing the values**:
   - There are 1007 odd numbers and 1007 even numbers from 1 to 2014.
   - For odd \( n \), \( f(n) = 2 \), so the sum for odd \( n \) is \( 1007 \times 2 = 2014 \).
   - For even \( n \), \( f(n) = 1 \), so the sum for even \( n \) is \( 1007 \times 1 = 1007 \).

5. **Total sum**:
   \[
   \text{Total sum} = 2014 + 1007 = 3021
   \]

6. **Finding the remainder when divided by 8**:
   \[
   3021 \div 8 = 377 \text{ remainder } 5
   \]

The final answer is \(\boxed{5}\).