Output an upside-down tent

MATL, 55 53 52 51 bytes

|95cy4*Y"DXytPEt0*yvG0>?P_]!'\/ 'w)95JG|G0<yEq:++&(

Try it online!

Explanation

Let N denote the input. The code proceeds in three steps.

First, the first line of 4*N underscores is built as a string and is displayed (which removes it from the stack).

Second, the "frame" of the tent is built using the two types of slashes. To do this, a numerical 2D array is created which contains 1 and 2 corresponding to the two types of slashes, and 0 for space.

This is done concatenating four matrices:

  1. An identity matrix of size abs (N);
  2. A matrix of the same size containing 2 in the antidiagonal;
  3. A null matrix of the same size;
  4. A copy of matrix 2.

Concatenating these four matrices vertically gives, using N=3 as an example, the following 4*N × N matrix:

1 0 0
0 1 0
0 0 1
0 0 2
0 2 0
2 0 0
0 0 0
0 0 0
0 0 0
0 0 2
0 2 0
2 0 0

(which, transposed, begins to look like the tent).

We now take care of the sign of the input. If it is positive we simply transpose the above matrix and index into the string '\/ '. Indexing is 1-based and modular, so 1 becomes '\', 2 becomes '/' and 0 becomes ' ', producing the 2D char array

\    /     /
 \  /     / 
  \/     /  

On the other hand, if the input is negative we vertically flip and arithmetically negate the 4*N × N matrix, producing

-2  0  0
 0 -2  0
 0  0 -2
 0  0  0
 0  0  0
 0  0  0
-2  0  0
 0 -2  0
 0  0 -2
 0  0 -1
 0 -1  0
-1  0  0

Index -1 now refers to '/' and -2 to '\'. That is, the two types of slashes have been interchanged, as required. Again transposing and indexing into the string '\/ ' thus gives the reversed tent:

\     \    /
 \     \  / 
  \     \/  

Third, underscores need to be filled into part of the last row of the 2D char array. The horizontal position of this line depends on the sign of the input, and its lenght is abs(N).

Once the corresponding spaces have been replaced by underscores, the result is implicitly displayed, below the initial line of underscores that was already displayed in the first step.


Javascript (ES6), 139 bytes

Builds the tent recursively:

f=(N,n=N>0?N:-N,i=0,r=(j,i)=>' _'[i||0].repeat(j),a=`\\${r(i)}/`,b=r(n*2+i-1,+!i))=>n--?f(N,n,i+2)+`
`+r(n)+(N<0?a+b+'/':'\\'+b+a):r(i*2,1)

Ungolfed and commented

f = (
  N,                                  // N is the original parameter (remains unchanged)
  n = N > 0 ? N : -N,                 // n is initialized to abs(N)
  i = 0,                              // i is the row counter (*2)
  r = (j, i) => ' _'[i||0].repeat(j), // helper function to repeat ' ' or '_' j times
  a = `\\${r(i)}/`,                   // a = '\ /' pattern
  b = r(n*2+i-1, +!i)                 // b = padding pattern filled with ' ' or '_'
) =>
  n-- ?                               // if we haven't made it yet to the top row:
    f(N, n, i+2) + `\n` +             //   - compute next row(s) / append line break
    r(n) +                            //   - append leading spaces
    (N < 0 ? a+b+'/' : '\\'+b+a)      //   - append a/b patterns according to N sign
  :                                   // else:
    r(i*2, 1)                         //   - return top row, made of '_' characters

Examples

var f=(N,n=N>0?N:-N,i=0,r=(j,i)=>' _'[i||0].repeat(j),a=`\\${r(i)}/`,b=r(n*2+i-1,+!i))=>n--?f(N,n,i+2)+`
`+r(n)+(N<0?a+b+'/':'\\'+b+a):r(i*2,1)

console.log(f(3));
console.log(f(-4));


Python 2, 143 141 139 138 137 bytes

-2 bytes thanks to @Sp3000 (no need to parenthesise exec in Python 2)
-1 byte thanks to @Sp3000 (use cmp)

def f(n):d=cmp(n,0);a,b='\/'[::-d];s=n*d;x=2*s-1;y=4*s;print'_'*y;i=0;exec"print' '*i+(b+' '*(y-3-x-i-i)+a+'_ '[s-i>1]*x+a)[::d];i+=1;"*s

Test it at ideone

First we see if n is negative and make d +1 if it is and -1 if not.
Then we select the two slashes, a and b, using d such that a='\', b='/' when n is positive and a='/', b='\' when n is negative.
Next we set s=abs(n) which may be achieved by s=n*d.
Then we calculate the number of _ at the top (bottom of the picture), which is also the number of in the side of the tent as x=2*s-1.
Then we calculate the number of _ at the base of the tent (top of the picture), and store it as y=4*s since it will be used in the loop to create the rest of the tent.
Now we print the base of the tent using print'_'*y.
Then we print the rest of the tent by executing s print statements with a looping variable i initialised to 0 which increments by 1 for each print statement.
The rest of the tent then has y-3-x-i-i spaces in the door and x spaces in the body until the top is reached, when s-i>1 evaluates to False, picking the _ from '_ '.
For a positive, left-door, tent the whole of the tent, excluding the leading spaces is back-to-front, so it is reversed while the positive, 'right-door', tent is not with [::d].